Home » date » 2010 » Dec » 21 »

*The author of this computation has been verified*
R Software Module: /rwasp_decomposeloess.wasp (opens new window with default values)
Title produced by software: Decomposition by Loess
Date of computation: Tue, 21 Dec 2010 15:14:43 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc.htm/, Retrieved Tue, 21 Dec 2010 16:12:46 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3010 2910 3840 3580 3140 3550 3250 2820 2260 2060 2120 2210 2190 2180 2350 2440 2370 2440 2610 3040 3190 3120 3170 3600 3420 3650 4180 2960 2710 2950 3030 3770 4740 4450 5550 5580 5890 7480 10450 6360 6710 6200 4490 3480 2520 1920 2010 1950 2240 2370 2840 2700 2980 3290 3300 3000 2330 2190 1970 2170 2830 3190 3550 3240 3450 3570 3230 3260 2700
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal691070
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
130102959.42742831948-112.4298598636553173.00243154418-50.5725716805209
229102440.62260894412257.2197800305693122.15761102531-469.377391055882
338403443.484331181371165.202878312183071.31279050645-396.515668818632
435803966.01319836328181.6798847197503012.30691691697386.013198363279
531403126.87419022295199.8247664495532953.30104332749-13.1258097770460
635503902.95718320862307.8079467171012889.23487007428352.957183208616
732503714.04016362922-39.20886045028972825.16869682107464.040163629218
828203017.99516130771-138.5496572727072760.554495965197.995161307707
922602243.61658212673-419.5568772356592695.94029510893-16.3834178732686
1020602166.60781770592-653.1620472126932606.55422950677106.607817705919
1121202163.39027303197-440.5584369365952517.1681639046243.3902730319733
1222102290.60071288212-308.2696629514562437.6689500693480.6007128821161
1321902134.26012362960-112.4298598636552358.16973623406-55.7398763704027
1421801747.16194574107257.2197800305692355.61827422836-432.838054258933
1523501181.730309465151165.202878312182353.06681222267-1168.26969053485
1624402265.39223814660181.6798847197502432.92787713365-174.607761853397
1723702027.38629150582199.8247664495532512.78894204462-342.613708494178
1824401926.92068824650307.8079467171012645.27136503639-513.079311753496
1926102481.45507242212-39.20886045028972777.75378802817-128.544927577876
2030403302.35205680778-138.5496572727072916.19760046492262.352056807783
2131903744.91546433398-419.5568772356593054.64141290168554.915464333976
2231203752.72269226373-653.1620472126933140.43935494896632.722692263735
2331703554.32113994036-440.5584369365953226.23729699623384.321139940361
2436004257.96670271318-308.2696629514563250.30296023827657.966702713184
2534203678.06123638334-112.4298598636553274.36862348031258.061236383344
2636503734.50630718956257.2197800305693308.2739127798784.5063071895602
2741803852.617919608391165.202878312183342.17920207943-327.382080391613
2829602287.52080973399181.6798847197503450.79930554626-672.479190266009
2927101660.75582453736199.8247664495533559.41940901309-1049.24417546264
3029501821.07184263389307.8079467171013771.12021064901-1128.92815736611
3130302116.38784816537-39.20886045028973982.82101228492-913.612151834633
3237703352.10251658051-138.5496572727074326.4471406922-417.89748341949
3347405229.48360813619-419.5568772356594670.07326909947489.483608136189
3444504496.09648428189-653.1620472126935057.065562930846.0964842818876
3555506096.50058017445-440.5584369365955444.05785676214546.500580174453
3655805766.60211112145-308.2696629514565701.66755183186.602111121452
3758905933.15261296579-112.4298598636555959.2772468978643.1526129657914
3874808740.30956639709257.2197800305695962.470653572341260.30956639709
391045013769.1330614411165.202878312185965.664060246823319.133061441
4063606799.38504275426181.6798847197505738.93507252599439.385042754259
4167107707.96914874528199.8247664495535512.20608480516997.969148745285
4262006956.81910494356307.8079467171015135.37294833934756.819104943559
4344904260.66904857677-39.20886045028974758.53981187352-229.330951423227
4434802795.2851719959-138.5496572727074303.26448527681-684.714828004099
4525201611.56771855556-419.5568772356593847.98915868010-908.432281444437
4619201036.60497165844-653.1620472126933456.55707555425-883.395028341555
4720101395.43344450819-440.5584369365953065.1249924284-614.566555491806
4819501347.51888218367-308.2696629514562860.75078076778-602.481117816328
4922401936.05329075649-112.4298598636552656.37656910717-303.946709243512
5023701872.76261217836257.2197800305692610.01760779107-497.237387821637
5128401951.138475212851165.202878312182563.65864647497-888.861524787152
5227002632.03896776521181.6798847197502586.28114751504-67.9610322347858
5329803151.27158499534199.8247664495532608.9036485551171.271584995345
5432903622.17880405024307.8079467171012650.01324923266332.178804050237
5533003948.08601054007-39.20886045028972691.12284991022648.086010540067
5630003404.6074474893-138.5496572727072733.94220978341404.607447489299
5723302302.79530757907-419.5568772356592776.76156965659-27.2046924209349
5821902228.11571855208-653.1620472126932805.0463286606138.1157185520815
5919701547.22734927196-440.5584369365952833.33108766463-422.772650728035
6021701786.09258132638-308.2696629514562862.17708162507-383.907418673617
6128302881.40678427814-112.4298598636552891.0230755855251.4067842781401
6231903191.06459498244257.2197800305692931.715624986991.06459498244021
6335502962.388947299351165.202878312182972.40817438847-587.611052700649
6432403283.10144931744181.6798847197503015.2186659628143.1014493174407
6534503642.14607601329199.8247664495533058.02915753715192.146076013294
6635703725.24783443182307.8079467171013106.94421885107155.247834431824
6732303343.34958028529-39.20886045028973155.85928016500113.349580285293
6832603448.39912083288-138.5496572727073210.15053643983188.399120832881
6927002555.11508452100-419.5568772356593264.44179271466-144.884915478996
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/1usrf1292944480.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/1usrf1292944480.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/2n1801292944480.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/2n1801292944480.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/3n1801292944480.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/3n1801292944480.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/4xt831292944480.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292944361cvsckvduswzm9uc/4xt831292944480.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1) #seasonal period
if (par2 != 'periodic') par2 <- as.numeric(par2) #s.window
par3 <- as.numeric(par3) #s.degree
if (par4 == '') par4 <- NULL else par4 <- as.numeric(par4)#t.window
par5 <- as.numeric(par5)#t.degree
if (par6 != '') par6 <- as.numeric(par6)#l.window
par7 <- as.numeric(par7)#l.degree
if (par8 == 'FALSE') par8 <- FALSE else par9 <- TRUE #robust
nx <- length(x)
x <- ts(x,frequency=par1)
if (par6 != '') {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.window=par6, l.degree=par7, robust=par8)
} else {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.degree=par7, robust=par8)
}
m$time.series
m$win
m$deg
m$jump
m$inner
m$outer
bitmap(file='test1.png')
plot(m,main=main)
dev.off()
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$time.series[,'trend']),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$time.series[,'seasonal']),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$time.series[,'remainder']),na.action=na.pass,lag.max = mylagmax,main='Remainder')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Parameters',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Component',header=TRUE)
a<-table.element(a,'Window',header=TRUE)
a<-table.element(a,'Degree',header=TRUE)
a<-table.element(a,'Jump',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,m$win['s'])
a<-table.element(a,m$deg['s'])
a<-table.element(a,m$jump['s'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,m$win['t'])
a<-table.element(a,m$deg['t'])
a<-table.element(a,m$jump['t'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Low-pass',header=TRUE)
a<-table.element(a,m$win['l'])
a<-table.element(a,m$deg['l'])
a<-table.element(a,m$jump['l'])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Time Series Components',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Remainder',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]+m$time.series[i,'remainder'])
a<-table.element(a,m$time.series[i,'seasonal'])
a<-table.element(a,m$time.series[i,'trend'])
a<-table.element(a,m$time.series[i,'remainder'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by