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 19:29:51 +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/t1292959678vq122ne8s249u6g.htm/, Retrieved Tue, 21 Dec 2010 20:27:58 +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/t1292959678vq122ne8s249u6g.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 «
320 324 343 295 301 367 196 182 342 361 333 330 345 323 365 323 316 358 235 169 430 409 407 341 326 374 364 349 300 385 304 196 443 414 325 388 356 386 444 387 327 448 225 182 460 411 342 361 377 331 428 340 352 461 221 198 422 329 320 375 364 351 380 319 322 386 221 187 343 342 365 313 356 337 389 326 343 357 220 218 391 425 332 298 360 336 325 393 301 426 265 210 429 440 357 431 442 422 544 420 396 482 261 211 448 468 464 425
 
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
Seasonal10810109
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1320321.86177168010518.6876172605011299.4506110593941.86177168010505
2324336.26580993037410.7968818919555300.9373081776712.2658099303742
3343329.55874353784554.0172511662081302.424005295947-13.4412564621548
4295280.7667455431935.34092248773241303.892331969075-14.2332544568073
5301313.752525591307-17.1131842335102305.36065864220312.7525255913071
6367366.11359464659261.0779286477992306.808476705609-0.886405353407781
7196192.696893113013-108.953187882027308.256294769014-3.30310688698711
8182208.093843496550-153.844477018832309.75063352228126.0938434965504
9342310.37967654084262.3753511836095311.244972275549-31.6203234591583
10361360.14911749925849.1645555534664312.686326947275-0.850882500741704
11333343.1407577798188.73156060118037314.12768161900210.1407577798177
12330335.0087345319819.71877099769739315.2724944703225.00873453198102
13345354.89507541785818.6876172605011316.4173073216419.89507541785758
14323316.50578691856210.7968818919555318.697331189482-6.49421308143758
15365355.00539377646954.0172511662081320.977355057323-9.99460622353098
16323315.8779641646355.34092248773241324.781113347633-7.12203583536495
17316320.528312595568-17.1131842335102328.5848716379424.52831259556791
18358323.20395940069361.0779286477992331.718111951508-34.7960405993074
19235244.101835616953-108.953187882027334.8513522650749.10183561695271
20169154.919635306076-153.844477018832336.924841712756-14.0803646939240
21430458.62631765595362.3753511836095338.99833116043728.626317655953
22409428.72573247255549.1645555534664340.10971197397919.7257324725547
23407464.0473466112998.73156060118037341.22109278752057.0473466112992
24341329.8704266618269.71877099769739342.410802340477-11.1295733381741
25326289.71187084606618.6876172605011343.600511893433-36.2881291539341
26374392.4399613795610.7968818919555344.76315672848518.4399613795598
27364328.05694727025654.0172511662081345.925801563536-35.9430527297444
28349346.2249324395085.34092248773241346.43414507276-2.77506756049212
29300270.170695651527-17.1131842335102346.942488581983-29.8293043484729
30385360.74695736184761.0779286477992348.175113990354-24.2530426381534
31304367.545448483302-108.953187882027349.40773939872563.5454484833018
32196193.404976952147-153.844477018832352.439500066685-2.59502304785349
33443468.15338808174562.3753511836095355.47126073464625.1533880817449
34414420.34903335389349.1645555534664358.4864110926416.34903335389288
35325279.7668779481848.73156060118037361.501561450636-45.2331220518164
36388403.8768162285819.71877099769739362.40441277372115.8768162285812
37356330.00511864269218.6876172605011363.307264096807-25.9948813573081
38386398.32339056386910.7968818919555362.87972754417612.3233905638687
39444471.53055784224754.0172511662081362.45219099154527.5305578422473
40387406.1628372514375.34092248773241362.4962402608319.1628372514373
41327308.572894703394-17.1131842335102362.540289530116-18.4271052966059
42448473.05657057444561.0779286477992361.86550077775625.0565705744451
43225197.762475856632-108.953187882027361.190712025395-27.2375241433683
44182158.670522908269-153.844477018832359.173954110563-23.3294770917307
45460500.46745262066162.3753511836095357.1571961957340.4674526206606
46411417.01276894469549.1645555534664355.8226755018386.01276894469538
47342320.7802845908738.73156060118037354.488154807947-21.2197154091269
48361357.7291016671679.71877099769739354.552127335136-3.27089833283316
49377380.69628287717418.6876172605011354.6160998623253.69628287717393
50331297.1122200079210.7968818919555354.090898100124-33.88777999208
51428448.41705249586854.0172511662081353.56569633792420.4170524958679
52340323.2282377376925.34092248773241351.430839774575-16.7717622623078
53352371.817201022283-17.1131842335102349.29598321122719.8172010222833
54461513.07777882968161.0779286477992347.8442925225252.0777788296809
55221204.560586048214-108.953187882027346.392601833813-16.4394139517860
56198205.023222036216-153.844477018832344.8212549826167.02322203621554
57422438.37474068497162.3753511836095343.2499081314216.3747406849708
58329268.18597733663549.1645555534664340.649467109898-60.8140226633648
59320293.2194133104438.73156060118037338.049026088377-26.7805866895575
60375404.8240075204589.71877099769739335.45722148184529.8240075204579
61364376.44696586418718.6876172605011332.86541687531212.4469658641866
62351359.99184862149510.7968818919555331.211269486558.99184862149457
63380376.42562673600454.0172511662081329.557122097787-3.5743732639956
64319304.4213451845275.34092248773241328.237732327741-14.5786548154734
65322334.194841675816-17.1131842335102326.91834255769412.1948416758157
66386385.40778374875261.0779286477992325.514287603449-0.592216251248374
67221226.842955232823-108.953187882027324.1102326492045.8429552328231
68187204.434899742192-153.844477018832323.4095772766417.4348997421921
69343300.91572691231562.3753511836095322.708921904076-42.0842730876852
70342311.84904574579049.1645555534664322.986398700744-30.1509542542103
71365398.0045639014078.73156060118037323.26387549741233.0045639014074
72313292.3822297052789.71877099769739323.898999297025-20.6177702947223
73356368.77825964286118.6876172605011324.53412309663812.7782596428613
74337336.59981985789410.7968818919555326.603298250151-0.400180142106137
75389395.31027543012854.0172511662081328.6724734036646.31027543012823
76326315.6843763903755.34092248773241330.974701121892-10.3156236096249
77343369.836255393389-17.1131842335102333.27692884012126.8362553933889
78357319.32433724358461.0779286477992333.597734108616-37.6756627564156
79220215.034648504915-108.953187882027333.918539377112-4.96535149508463
80218256.772093017706-153.844477018832333.07238400112638.7720930177061
81391387.39842019125062.3753511836095332.22622862514-3.60157980874959
82425468.79470290711149.1645555534664332.04074153942343.7947029071111
83332323.4131849451148.73156060118037331.855254453705-8.5868150548855
84298253.2379738877859.71877099769739333.043255114518-44.7620261122151
85360367.08112696416918.6876172605011334.2312557753307.0811269641685
86336324.8360577055710.7968818919555336.367060402474-11.1639422944298
87325257.47988380417454.0172511662081338.502865029618-67.5201161958263
88393438.450765986325.34092248773241342.20831152594745.4507659863204
89301273.199426211234-17.1131842335102345.913758022276-27.800573788766
90426438.23620693670261.0779286477992352.68586441549912.2362069367022
91265279.495217073306-108.953187882027359.45797080872114.4952170733058
92210205.393458657205-153.844477018832368.451018361626-4.60654134279457
93429418.18058290185962.3753511836095377.444065914532-10.8194170981412
94440445.07313983086849.1645555534664385.7623046156655.0731398308684
95357311.1878960820218.73156060118037394.080543316799-45.8121039179791
96431453.2717235817639.71877099769739399.0095054205422.2717235817626
97442461.37391521521718.6876172605011403.93846752428119.3739152152175
98422427.25203944315910.7968818919555405.9510786648855.25203944315945
99544626.01905902830354.0172511662081407.96368980548982.0190590283032
100420425.9715925480395.34092248773241408.6874849642295.97159254803887
101396399.701904110541-17.1131842335102409.4112801229693.70190411054148
102482492.54095659687261.0779286477992410.38111475532910.5409565968722
103261219.602238494338-108.953187882027411.350949387689-41.3977615056616
104211164.162446576726-153.844477018832411.682030442106-46.8375534232744
105448421.61153731986762.3753511836095412.013111496524-26.3884626801334
106468474.78494965193349.1645555534664412.0504947946016.784949651933
107464507.1805613061428.73156060118037412.08787809267743.1805613061423
108425428.0864874376449.71877099769739412.1947415646593.08648743764377
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/13g9i1292959786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/13g9i1292959786.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/23g9i1292959786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/23g9i1292959786.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/4vpqk1292959786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292959678vq122ne8s249u6g/4vpqk1292959786.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