Home » date » 2009 » Dec » 06 »

WS9

*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: Sun, 06 Dec 2009 12:42:08 -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/06/t1260128572szn7x3bp7jft2ny.htm/, Retrieved Sun, 06 Dec 2009 20:42:57 +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/06/t1260128572szn7x3bp7jft2ny.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 «
286602 283042 276687 277915 277128 277103 275037 270150 267140 264993 287259 291186 292300 288186 281477 282656 280190 280408 276836 275216 274352 271311 289802 290726 292300 278506 269826 265861 269034 264176 255198 253353 246057 235372 258556 260993 254663 250643 243422 247105 248541 245039 237080 237085 225554 226839 247934 248333 246969 245098 246263 255765 264319 268347 273046 273963 267430 271993 292710 295881 293299
 
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
1286602288283.5473401597904.64296547268277015.8096943681681.54734015925
2283042285396.8008091413511.75019532022277175.4489955392354.80080914067
3276687278162.958227938-2124.04652464782277335.088296711475.95822793769
4277915278219.61193407549.4823079391573277560.905757986304.611934074841
5277128274589.6638597741879.61292096409277786.723219262-2538.33614022593
6277103275179.303914318970.464403580195278056.231682101-1923.69608568161
7275037274434.345679252-2686.08582419262278325.740144941-602.654320748406
8270150266004.7109927-4308.76108191526278604.050089215-4145.28900729993
9267140265689.877617028-10292.2376505172278882.360033489-1450.12238297204
10264993263361.204257918-12669.4331204611279294.228862543-1631.79574208159
11287259286702.9274217928108.97488661175279706.097691596-556.072578207823
12291186292615.3274984529655.63833319157280101.0341683561429.32749845221
13292300296199.3863894117904.64296547268280495.9706451163899.38638941105
14288186292026.4387092173511.75019532022280833.8110954633840.43870921677
15281477283906.394978838-2124.04652464782281171.6515458102429.39497883816
16282656283847.73512990049.4823079391573281414.7825621611191.73512989952
17280190276842.4735005231879.61292096409281657.913578513-3347.52649947704
18280408278208.717836694970.464403580195281636.817759726-2199.28216330591
19276836274742.363883254-2686.08582419262281615.721940938-2093.63611674588
20275216273583.984508351-4308.76108191526281156.776573564-1632.01549164904
21274352278298.406444327-10292.2376505172280697.831206193946.40644432709
22271311275516.152405758-12669.4331204611279775.2807147034205.15240575804
23289802292642.2948901728108.97488661175278852.7302232162840.29489017237
24290726294423.7111356689655.63833319157277372.650531143697.71113566816
25292300300802.7861954637904.64296547268275892.5708390658502.78619546269
26278506279757.3501769073511.75019532022273742.8996277731251.35017690674
27269826270182.818108166-2124.04652464782271593.228416481356.818108166393
28265861262770.53497865449.4823079391573268901.982713407-3090.46502134629
29269034269977.6500687031879.61292096409266210.737010333943.650068703108
30264176263922.619465147970.464403580195263458.916131273-253.380534852738
31255198252374.990571980-2686.08582419262260707.095252212-2823.00942801972
32253353252723.747014535-4308.76108191526258291.01406738-629.252985464729
33246057246531.304767970-10292.2376505172255874.932882548474.30476796953
34235372229412.835734903-12669.4331204611254000.597385558-5959.16426509718
35258556256876.7632248198108.97488661175252126.261888569-1679.23677518056
36260993261738.1428571249655.63833319157250592.218809685745.142857123632
37254663252363.1813037277904.64296547268249058.175730801-2299.81869627346
38250643250038.2583214623511.75019532022247735.991483218-604.741678538441
39243422242554.239289012-2124.04652464782246413.807235636-867.760710987815
40247105248859.45843971849.4823079391573245301.0592523431754.45843971783
41248541251014.0758099851879.61292096409244188.3112690502473.07580998546
42245039245797.888515985970.464403580195243309.647080435758.88851598493
43237080234415.102932373-2686.08582419262242430.982891819-2664.89706762668
44237085236443.310999216-4308.76108191526242035.450082699-641.689000783546
45225554219760.320376939-10292.2376505172241639.917273578-5793.67962306115
46226839224109.410416003-12669.4331204611242238.022704458-2729.58958399663
47247934244922.8969780518108.97488661175242836.128135337-3011.1030219488
48248333242186.7903986319655.63833319157244823.571268177-6146.20960136876
49246969239222.342633517904.64296547268246811.014401017-7746.65736648996
50245098236659.8428043533511.75019532022250024.407000326-8438.15719564664
51246263241412.246925012-2124.04652464782253237.799599636-4850.7530749877
52255765254284.75770211449.4823079391573257195.759989947-1480.24229788600
53264319265604.6666987781879.61292096409261153.7203802581285.66669877773
54268347270652.326406955970.464403580195265071.2091894642305.32640695537
55273046279789.387825522-2686.08582419262268988.6979986716743.38782552193
56273963279294.05454129-4308.76108191526272940.7065406255331.05454129027
57267430268259.522567938-10292.2376505172276892.715082579829.522567937907
58271993275815.739322695-12669.4331204611280839.6937977663822.73932269472
59292710292524.3526004358108.97488661175284786.672512953-185.647399565205
60295881293443.9214876789655.63833319157288662.440179131-2437.07851232245
61293299286155.1491892197904.64296547268292538.207845308-7143.85081078089
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/1189b1260128526.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/1189b1260128526.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/21t6t1260128526.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/21t6t1260128526.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/3c11f1260128526.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/3c11f1260128526.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/4poyx1260128526.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128572szn7x3bp7jft2ny/4poyx1260128526.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