Home » date » 2010 » Dec » 20 »

Decomposition by Loess bis

*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: Mon, 20 Dec 2010 22:28:35 +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/20/t12928842120an8fr4mifugf43.htm/, Retrieved Mon, 20 Dec 2010 23:30:12 +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/20/t12928842120an8fr4mifugf43.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 «
1038.00 934.00 988.00 870.00 854.00 834.00 872.00 954.00 870.00 1238.00 1082.00 1053.00 934.00 787.00 1081.00 908.00 995.00 825.00 822.00 856.00 887.00 1094.00 990.00 936.00 1097.00 918.00 926.00 907.00 899.00 971.00 1087.00 1000.00 1071.00 1190.00 1116.00 1070.00 1314.00 1068.00 1185.00 1215.00 1145.00 1251.00 1363.00 1368.00 1535.00 1853.00 1866.00 2023.00 1373.00 1968.00 1424.00 1160.00 1243.00 1375.00 1539.00 1773.00 1906.00 2076.00 2004.00
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal601
Trend2513
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
110381047.2530889875264.707688883149964.0392221293339.25308898751814
2934976.730174708071-72.1574524069796963.42727769890842.7301747080714
3988991.11444592504322.0702208064731962.8153332684843.11444592504336
4870855.764671488434-77.9680603264932962.203388838059-14.2353285115656
5854822.834606651786-76.3940462852162961.55943963343-31.165393348214
6834811.002461782162-103.917952210964960.915490428801-22.9975382178376
7872837.47723979627-53.7487810204431960.271541224173-34.5227602037297
8954990.989417830787-42.3563127856579959.36689495487136.9894178307869
9870804.557712169087-23.0199608546557958.46224868557-65.4422878309133
1012381304.07368885219214.368708731541957.55760241626766.0736888521923
1110821097.42734940098109.748193528962956.82445707005815.4273494009803
1210531103.5768955215846.331792754568956.09131172384850.5768955215839
13934847.44153760395765.2002960184042955.358166377639-86.558462396043
14787688.34614226978-66.6034159115078952.257273641727-98.6538577302196
1510811200.9067028367811.9369162574081949.156380905816119.906702836776
16908954.737523225179-84.7930113950834946.05548816990446.737523225179
179951133.21573852982-87.7471284622162944.531389932395138.215738529821
18825812.826156407136-105.833448102022943.007291694886-12.1738435928644
19822753.642518197847-51.1257116552236941.483193457377-68.3574818021532
20856810.351017681616-42.4045069995284944.053489317913-45.6489823183842
21887840.273593545218-12.8973787236666946.623785178448-46.7264064547818
2210941020.43692208564218.368996875377949.194081038984-73.5630779143611
23990905.601902564848119.605242711981954.79285472317-84.3980974351517
24936855.9866509151955.6217206774537960.391628407357-80.0133490848107
2510971167.5194501933960.4901477150676965.99040209154370.519450193389
26918917.104785086843-55.1391513463279974.034366259485-0.895214913157133
27926879.017457952376-9.0957883798033982.078330427427-46.9825420476237
28907925.857219736293-101.979514331662990.12229459536918.8572197362928
29899903.776547079-110.1627236344541004.386176555454.77654707900047
309711034.86569901149-111.5157575270241018.6500585155463.8656990114871
3110871187.96196952376-46.875909999381032.91394047562100.961969523758
321000992.120490816448-46.36641513417631054.24592431773-7.87950918355205
3310711052.8630128093313.55907903083911075.57790815984-18.1369871906743
3411901063.06099336022220.0291146378421096.90989200194-126.939006639784
351116970.29433804276137.6420318977511124.06363005949-145.705661957241
361070869.842946445146118.9396854378181151.21736811704-200.157053554854
3713141424.4679878445425.16090598087681178.37110617458110.467987844539
381068903.47535322809717.86493917790111214.65970759400-164.524646771903
3911851166.58715489789-47.53546391131221250.94830901342-18.4128451021074
4012151306.66895616705-163.9058665998851287.2369104328491.6689561670476
4111451131.09793082367-168.5033915401941327.40546071652-13.9020691763285
4212511274.20704256757-139.7810535677801367.5740110002123.2070425675724
4313631375.85959608781-57.60215737170081407.7425612838912.859596087809
4413681326.35760762263-27.31750656977461436.95989894714-41.642392377365
4515351552.5152826702151.30748071939941466.1772366103917.5152826702129
4618531964.6120336583245.9933920680661495.39457427364111.612033658299
4718662045.97489449676169.1937839670881516.83132153615179.974894496760
4820232363.99272101815143.7392101831851538.26806879867340.992721018148
4913731172.6489655887213.64621835009931559.70481606118-200.351034411282
5019682320.6566427367433.05598142686511582.28737583640352.656642736738
5114241308.63255777776-65.50249338937351604.86993561161-115.367442222237
521160877.826843709907-185.2793390967311627.45249538682-282.173156290093
5312431030.05691891226-192.0912274164511648.03430850419-212.943081087744
5413751232.53328161228-151.1494032338441668.61612162157-142.466718387722
5515391451.53200402531-62.72993876424741689.19793473894-87.4679959746884
5617731861.83695608635-24.92770426594071709.0907481795988.8369560863507
5719062021.2455835937161.77085478604871728.98356162024115.245583593707
5820762148.26899026611254.8546346729881748.876375060972.2689902661141
5920042056.71685236325182.0974952393801769.1856523973752.7168523632542
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/1zfym1292884111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/1zfym1292884111.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/2soyp1292884111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/2soyp1292884111.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/3soyp1292884111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/3soyp1292884111.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/4lyfs1292884111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/4lyfs1292884111.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/7dhta1292884111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928842120an8fr4mifugf43/7dhta1292884111.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = 6 ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = 6 ; 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')
bitmap(file='test5.png')
myresid <- m$time.series[!is.na(m$time.series[,'remainder']),'remainder']
hist(as.numeric(myresid), main='Residual Histogram', xlab='Residual Value')
dev.off()
 





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