Home » date » 2010 » Dec » 20 »

*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 10:15:16 +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/t1292840004tpniojb75vswyy7.htm/, Retrieved Mon, 20 Dec 2010 11:13:26 +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/t1292840004tpniojb75vswyy7.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 «
377 370 358 357 349 348 369 381 368 361 351 351 358 354 347 345 343 340 362 370 373 371 354 357 363 364 363 358 357 357 380 378 376 380 379 384 392 394 392 396 392 396 419 421 420 418 410 418 426 428 430 424 423 427 441 449 452 462 455 461 461 463 462 456 455 456 472 472 471 465 459 465 468 467 463 460 462 461 476 476 471 453 443 442 444 438 427 424 416 406 431 434 418 412 404 409 412 406 398 397 385 390 413 413 401 397 397 409 419 424 428 430 424 433 456 459 446 441 439 454 460 457 451 444 437 443 471 469 454 444 436
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1377382.4280981741863.83527790809046367.7366239177235.4280981741864
2370371.497784686481.88092257262018366.62129274091.49778468647992
3358353.385652604302-2.89161416837898365.505961564077-4.61434739569762
4357355.517107940219-5.89575270014044364.378644759922-1.48289205978108
5349345.466742134595-10.7180700903614363.251327955766-3.53325786540506
6348343.84196007035-9.92232934353665362.080369273187-4.15803992965044
7369366.30808916028110.7825002491113360.909410590608-2.69191083971896
8381389.10713535727513.1397900208043359.7530746219218.10713535727473
9368371.3607205771156.04254076965048358.5967386532343.36072057711522
10361363.1143079713051.19226840949127357.6934236192042.11430797130492
11351351.686077795541-6.47618638071424356.7901085851730.686077795540882
12351347.024052300319-0.969349629556216355.945297329238-3.97594769968129
13358357.0642360186083.83527790809046355.100486073302-0.935763981392085
14354351.4348830796671.88092257262018354.684194347713-2.56511692033331
15347342.623711546254-2.89161416837898354.267902622125-4.37628845374564
16345341.289600776253-5.89575270014044354.606151923887-3.71039922374678
17343341.773668864712-10.7180700903614354.94440122565-1.22633113528843
18340334.213289525198-9.92232934353665355.709039818339-5.78671047480213
19362356.74382133986110.7825002491113356.473678411028-5.25617866013903
20370369.42207539283413.1397900208043357.438134586362-0.577924607165869
21373381.5548684686546.04254076965048358.4025907616958.55486846865415
22371381.2379550856911.19226840949127359.56977650481810.2379550856911
23354353.739224132774-6.47618638071424360.73696224794-0.260775867225789
24357353.140693285815-0.969349629556216361.828656343741-3.85930671418527
25363359.2443716523673.83527790809046362.920350439543-3.75562834763338
26364362.3895514570281.88092257262018363.729525970351-1.61044854297165
27363364.352912667219-2.89161416837898364.538701501161.3529126672189
28358356.220667695775-5.89575270014044365.675085004366-1.77933230422542
29357357.90660158279-10.7180700903614366.8114685075720.90660158278979
30357355.117320054771-9.92232934353665368.805009288765-1.88267994522874
31380378.41894968092910.7825002491113370.798550069959-1.58105031907053
32378369.53272434058713.1397900208043373.327485638609-8.46727565941296
33376370.1010380230916.04254076965048375.856421207258-5.89896197690859
34380379.9997879647181.19226840949127378.807943625791-0.000212035281947465
35379382.716720336391-6.47618638071424381.7594660443233.71672033639101
36384383.866267832976-0.969349629556216385.10308179658-0.133732167023766
37392391.7180245430733.83527790809046388.446697548837-0.281975456927171
38394394.2527645990671.88092257262018391.8663128283130.252764599066893
39392391.60568606059-2.89161416837898395.285928107789-0.394313939410154
40396399.472285463411-5.89575270014044398.4234672367293.47228546341114
41392393.157063724692-10.7180700903614401.561006365671.15706372469191
42396397.519922304758-9.92232934353665404.4024070387791.51992230475815
43419419.97369203900110.7825002491113407.2438077118880.97369203900115
44421418.85369236439613.1397900208043410.006517614799-2.14630763560365
45420421.1882317126386.04254076965048412.7692275177111.18823171263836
46418419.3930755735571.19226840949127415.4146560169521.39307557355664
47410408.416101864521-6.47618638071424418.060084516193-1.58389813547888
48418416.461828236798-0.969349629556216420.507521392758-1.53817176320206
49426425.2097638225863.83527790809046422.954958269323-0.790236177413931
50428428.673142517941.88092257262018425.445934909440.673142517940278
51430434.954702618823-2.89161416837898427.9369115495564.95470261882332
52424422.90931447306-5.89575270014044430.986438227081-1.09068552694038
53423422.682105185755-10.7180700903614434.035964904606-0.317894814244596
54427426.539694266638-9.92232934353665437.382635076898-0.460305733361736
55441430.48819450169810.7825002491113440.729305249191-10.511805498302
56449440.99768170983613.1397900208043443.86252826936-8.0023182901644
57452450.961707940826.04254076965048446.995751289529-1.03829205917998
58462472.9115889415391.19226840949127449.8961426489710.911588941539
59455463.679652372304-6.47618638071424452.796534008418.6796523723043
60461467.626159375118-0.969349629556216455.3431902544386.62615937511805
61461460.2748755914433.83527790809046457.889846500466-0.725124408556894
62463464.5615448562921.88092257262018459.5575325710881.56154485629224
63462465.66639552667-2.89161416837898461.2252186417093.66639552667033
64456455.964800318236-5.89575270014044461.930952381904-0.0351996817635154
65455458.081383968262-10.7180700903614462.6366861220993.08138396826212
66456458.923082320565-9.92232934353665462.9992470229722.92308232056456
67472469.85569182704410.7825002491113463.361807923845-2.14430817295619
68472467.19847282281913.1397900208043463.661737156376-4.80152717718056
69471471.9957928414426.04254076965048463.9616663889080.995792841441812
70465464.5079200090111.19226840949127464.299811581498-0.492079990988827
71459459.838229606627-6.47618638071424464.6379567740870.83822960662684
72465465.881306255307-0.969349629556216465.0880433742490.881306255307038
73468466.6265921174993.83527790809046465.538129974411-1.37340788250145
74467466.3729222830531.88092257262018465.746155144326-0.627077716946644
75463462.937433854137-2.89161416837898465.954180314242-0.0625661458629452
76460460.571751305548-5.89575270014044465.3240013945930.571751305547934
77462470.024247615418-10.7180700903614464.6938224749438.02424761541829
78461468.858540698697-9.92232934353665463.063788644847.85854069869674
79476479.78374493615210.7825002491113461.4337548147373.783744936152
80476480.03910550339613.1397900208043458.82110447584.03910550339583
81471479.7490050934876.04254076965048456.2084541368638.74900509348652
82453452.0967195901441.19226840949127452.711012000365-0.903280409856166
83443443.262616516847-6.47618638071424449.2135698638670.262616516847345
84442439.781522090252-0.969349629556216445.187827539304-2.21847790974783
85444443.0026368771683.83527790809046441.162085214741-0.9973631228317
86438436.8840819769061.88092257262018437.234995450474-1.11591802309397
87427423.583708482173-2.89161416837898433.307905686206-3.41629151782735
88424424.094813066292-5.89575270014044429.8009396338490.0948130662916924
89416416.42409650887-10.7180700903614426.2939735814910.424096508870264
90406398.567444234079-9.92232934353665423.354885109457-7.43255576592077
91431430.80170311346510.7825002491113420.415796637424-0.19829688653499
92434436.99017225882813.1397900208043417.8700377203682.99017225882778
93418414.6331804270376.04254076965048415.324278803312-3.36681957296258
94412409.7322379397691.19226840949127413.07549365074-2.26776206023112
95404403.649477882547-6.47618638071424410.826708498168-0.350522117453409
96409410.012554405907-0.969349629556216408.9567952236491.012554405907
97412413.0778401427793.83527790809046407.0868819491311.07784014277877
98406404.5747081219551.88092257262018405.544369305425-1.42529187804507
99398394.88975750666-2.89161416837898404.001856661719-3.11024249334002
100397396.963304743901-5.89575270014044402.932447956239-0.0366952560989944
101385378.855030839602-10.7180700903614401.86303925076-6.14496916039849
102390388.16818213107-9.92232934353665401.754147212467-1.83181786892999
103413413.57224457671510.7825002491113401.6452551741730.57224457671532
104413409.84746478254413.1397900208043403.012745196652-3.15253521745632
105401391.5772240112196.04254076965048404.380235219131-9.42277598878115
106397385.6834618970311.19226840949127407.124269693478-11.3165381029692
107397390.607882212889-6.47618638071424409.868304167825-6.39211778711092
108409405.402993676285-0.969349629556216413.566355953271-3.59700632371522
109419416.9003143531923.83527790809046417.264407738718-2.09968564680821
110424424.8063444305621.88092257262018421.3127329968180.806344430561921
111428433.530555913461-2.89161416837898425.3610582549185.53055591346094
112430436.717433395931-5.89575270014044429.1783193042096.71743339593132
113424425.722489736861-10.7180700903614432.99558035351.72248973686118
114433439.677487572926-9.92232934353665436.2448417706116.677487572926
115456461.72339656316810.7825002491113439.4941031877215.72339656316763
116459462.88174303121113.1397900208043441.9784669479843.88174303121127
117446441.4946285221026.04254076965048444.462830708248-4.50537147789822
118441434.7946940588621.19226840949127446.013037531646-6.20530594113757
119439436.912942025669-6.47618638071424447.563244355045-2.08705797433072
120454460.302253624712-0.969349629556216448.6670960048456.30225362471168
121460466.3937744372653.83527790809046449.7709476546446.39377443726534
122457461.7484818993221.88092257262018450.3705955280584.74848189932186
123451453.921370766907-2.89161416837898450.9702434014722.92137076690727
124444443.049331041713-5.89575270014044450.846421658428-0.950668958287338
125437433.995470174978-10.7180700903614450.722599915384-3.00452982502247
126443445.43155190426-9.92232934353665450.4907774392772.43155190425972
127471480.95854478771910.7825002491113450.258954963179.95854478771867
128469474.90880513955613.1397900208043449.951404839645.9088051395558
129454452.313604514246.04254076965048449.64385471611-1.68639548576027
130444437.5892339787891.19226840949127449.21849761172-6.4107660212112
131436429.683045873384-6.47618638071424448.79314050733-6.31695412661594
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292840004tpniojb75vswyy7/13fdh1292840111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292840004tpniojb75vswyy7/13fdh1292840111.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292840004tpniojb75vswyy7/47fb51292840111.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292840004tpniojb75vswyy7/47fb51292840111.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