Home » date » 2009 » Dec » 01 »

*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, 01 Dec 2009 11:48:36 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c.htm/, Retrieved Tue, 01 Dec 2009 19:49:24 +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/2009/Dec/01/t1259693359ie158i5ab19gj6c.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
785.8 819.3 849.4 880.4 900.1 937.2 948.9 952.6 947.3 974.2 1000.8 1032.8 1050.7 1057.3 1075.4 1118.4 1179.8 1227 1257.8 1251.5 1236.3 1170.6 1213.1 1265.5 1300.8 1348.4 1371.9 1403.3 1451.8 1474.2 1438.2 1513.6 1562.2 1546.2 1527.5 1418.7 1448.5 1492.1 1395.4 1403.7 1316.6 1274.5 1264.4 1323.9 1332.1 1250.2 1096.7 1080.8 1039.2 792 746.6 688.8 715.8 672.9 629.5 681.2 755.4 760.6 765.9 836.8 904.9
 
Output produced by software:


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


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1785.8723.21899494725227.3330394632159821.047965589532-62.5810050527484
2819.3821.025514220258-21.7498038342756839.3242896140171.72551422025822
3849.4876.024055874798-34.8246695132999857.60061363850226.6240558747977
4880.4909.763209427012-24.936350625787875.97314119877529.3632094270116
5900.1918.182386593958-12.3280553530065894.34566875904918.0823865939581
6937.2970.891089530729-9.71992159381622913.22883206308733.6910895307291
7948.9986.53979861381-20.8517939809352932.11199536712637.6397986138093
8952.6936.33238611063217.6676867673212951.199927122047-16.2676138893681
9947.3882.82499112565941.4871499973735970.287858876968-64.4750088743414
10974.2939.73045353347819.3094748441347989.360071622387-34.4695464665216
111000.8989.2959120096583.871803622535981008.43228436781-11.5040879903420
121032.81017.8541246530414.74152034010731033.00435500685-14.9458753469578
131050.71016.4905348908927.33303946321591057.57642564589-34.2094651091106
141057.31052.98605890302-21.74980383427561083.36374493125-4.31394109697681
151075.41076.47360529669-34.82466951329991109.151064216611.07360529668995
161118.41130.57498556675-24.9363506257871131.1613650590412.1749855667499
171179.81218.75638945154-12.32805535300651153.1716659014638.9563894515418
1812271291.76599747425-9.719921593816221171.9539241195664.7659974742514
191257.81345.71561164327-20.85179398093521190.7361823376687.9156116432705
201251.51274.7716904071617.66768676732121210.5606228255223.2716904071588
211236.31200.7277866892541.48714999737351230.38506331338-35.572213310749
221170.61070.4857337448219.30947484413471251.40479141105-100.114266255180
231213.11149.903676868753.871803622535981272.42451950872-63.1963231312513
241265.51221.7019225450514.74152034010731294.55655711484-43.7980774549462
251300.81257.5783658158227.33303946321591316.68859472096-43.2216341841784
261348.41376.32053727159-21.74980383427561342.2292665626927.9205372715892
271371.91410.85473110889-34.82466951329991367.7699384044138.9547311088891
281403.31437.2454601717-24.9363506257871394.2908904540933.9454601717
291451.81495.11621284924-12.32805535300651420.8118425037643.3162128492431
301474.21519.21982442130-9.719921593816221438.9000971725245.0198244212959
311438.21440.26344213966-20.85179398093521456.988351841282.06344213965804
321513.61544.9902560553617.66768676732121464.5420571773231.3902560553586
331562.21610.8170874892641.48714999737351472.0957625133648.6170874892632
341546.21603.8185997852519.30947484413471469.2719253706257.6185997852472
351527.51584.680108149593.871803622535981466.4480882278757.180108149591
361418.71368.7648214514214.74152034010731453.89365820847-49.9351785485808
371448.51428.3277323477127.33303946321591441.33922818907-20.1722676522900
381492.11583.54646958150-21.74980383427561422.4033342527891.4464695814966
391395.41422.15722919682-34.82466951329991403.4674403164826.7572291968161
401403.71453.85520586307-24.9363506257871378.4811447627250.15520586307
411316.61292.03320614406-12.32805535300651353.49484920895-24.5667938559441
421274.51238.92156726318-9.719921593816221319.79835433064-35.5784327368226
431264.41263.54993452861-20.85179398093521286.10185945233-0.850065471391872
441323.91390.4832954718517.66768676732121239.6490177608366.5832954718464
451332.11429.5166739332941.48714999737351193.1961760693497.4166739332886
461250.21342.4226140196619.30947484413471138.6679111362192.2226140196594
471096.71105.388550174393.871803622535981084.139646203078.68855017438977
481080.81119.1965060090014.74152034010731027.6619736508938.3965060090018
491039.21079.8826594380827.3330394632159971.18430109870740.6826594380768
50792687.860123409571-21.7498038342756917.889680424704-104.139876590429
51746.6663.429609762598-34.8246695132999864.595059750702-83.1703902374019
52688.8569.727230508675-24.936350625787832.809120117112-119.072769491325
53715.8642.904874869483-12.3280553530065801.023180483523-72.8951251305165
54672.9567.390088258918-9.71992159381622788.129833334898-105.509911741082
55629.5504.615307794662-20.8517939809352775.236486186273-124.884692205338
56681.2580.21686473510517.6676867673212764.515448497574-100.983135264895
57755.4715.51843919375141.4871499973735753.794410808875-39.8815608062486
58760.6755.70626115929319.3094748441347746.184263996573-4.89373884070721
59765.9789.3540791931943.87180362253598738.5741171842723.4540791931942
60836.8924.16670921133114.7415203401073734.69177044856187.3667092113311
61904.91051.6575368239327.3330394632159730.809423712853146.757536823931
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/1p82m1259693314.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/1p82m1259693314.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/21nll1259693314.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/21nll1259693314.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/3mavo1259693314.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/3mavo1259693314.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/4dmv81259693314.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259693359ie158i5ab19gj6c/4dmv81259693314.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 0 ; par9 = 0 ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ; par9 = 0 ;
 
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