Home » date » 2010 » Dec » 24 »

*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: Fri, 24 Dec 2010 11:02:24 +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/24/t1293188430amkdieqo9wx6c27.htm/, Retrieved Fri, 24 Dec 2010 12:00:30 +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/24/t1293188430amkdieqo9wx6c27.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 «
6,4 7,7 9,2 8,6 7,4 8,6 6,2 6 6,6 5,1 4,7 5 3,6 1,9 -0,1 -5,7 -5,6 -6,4 -7,7 -8 -11,9 -15,4 -15,5 -13,4 -10,9 -10,8 -7,3 -6,5 -5,1 -5,3 -6,8 -8,4 -8,4 -9,7 -8,8 -9,6 -11,5 -11 -14,9 -16,2 -14,4 -17,3 -15,7 -12,6 -9,4 -8,1 -5,4 -4,6 -4,9 -4 -3,1 -1,3 0 -0,4 3 0,4 1,2 0,6 -1,3 -3,2 -1,8 -3,6 -4,2 -6,9 -8 -7,5 -8,2 -7,6 -3,7 -1,7 -0,7 0,2 0,6 2,2 3,3 5,3 5,5 6,3 7,7 6,5 5,5 6,9 5,7 6,9 6,1 4,8 3,7 5,8 6,8 8,5 7,2 5 4,7 2,3 2,4 0,1 1,9 1,7 2 -1,9 0,5 -1,3 -3,3 -2,8 -8 -13,9 -21,9 -28,8 -27,6 -31,4 -31,8 -29,4 -27,6 -23,6 -22,8 -18,2 -17,8 -14,2 -8,8 -7,9 -7 -7 -3,6 -2,4 -4,9 -7,7 -6,5 -5,1 -3,4 -2,8 0,8
 
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
Seasonal13110132
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
16.43.93875305673375-0.2158019581100819.07704890137633-2.46124694326625
27.77.22063018394759-0.4735033461781768.65287316223059-0.479369816052415
39.210.2570539951293-0.08575141821414238.228697423084851.05705399512929
48.69.7554926094968-0.3353101644957637.779817554998971.15549260949680
57.47.235748721248820.2333135918380997.33093768691308-0.164251278751181
68.610.12228801960630.2195460220937606.858165958299961.52228801960628
76.25.81791749708450.1966882732286636.38539422968684-0.382082502915501
865.713072199176680.4162532004195785.87067460040374-0.286927800823317
96.67.380952699826010.463092329053355.355954971120640.780952699826009
105.15.71947426302595-0.07051107605642964.551036813030480.619474263025952
114.75.494361089013220.1595202560464623.746118654940310.794361089013225
1257.92831492150629-0.5075351090771622.579220187570872.92831492150629
133.66.00348023790865-0.2158019581100811.412321720201432.40348023790865
141.94.24919182660465-0.4735033461781760.02431151957352742.34919182660465
15-0.11.24945009926852-0.0857514182141423-1.363698681054381.34945009926852
16-5.7-8.07685703837869-0.335310164495763-2.98783279712555-2.37685703837869
17-5.6-6.821346678641370.233313591838099-4.61196691319673-1.22134667864137
18-6.4-6.872251258996350.219546022093760-6.14729476309741-0.472251258996351
19-7.7-7.914065660230570.196688273228663-7.6826226129981-0.214065660230569
20-8-7.735301528450880.416253200419578-8.68095167196870.264698471549124
21-11.9-14.58381159811400.46309232905335-9.6792807309393-2.68381159811404
22-15.4-20.7417955633366-0.0705110760564296-9.987693360607-5.34179556333657
23-15.5-20.86341426577180.159520256046462-10.2961059902747-5.36341426577178
24-13.4-16.1343427560431-0.507535109077162-10.1581221348797-2.73434275604314
25-10.9-11.5640597624052-0.215801958110081-10.0201382794847-0.664059762405218
26-10.8-11.4583687287859-0.473503346178176-9.66812792503596-0.658368728785867
27-7.3-5.19813101119864-0.0857514182141423-9.316117570587222.10186898880136
28-6.5-3.76810977520524-0.335310164495763-8.8965800602992.73189022479476
29-5.1-1.956271041827330.233313591838099-8.477042550010773.14372895817267
30-5.3-2.530613027467180.219546022093760-8.288932994626582.76938697253282
31-6.8-5.695864833986270.196688273228663-8.10082343924241.10413516601373
32-8.4-8.842347576984160.416253200419578-8.37390562343542-0.442347576984162
33-8.4-8.616104521424910.46309232905335-8.64698780762844-0.216104521424914
34-9.7-10.0049581412603-0.0705110760564296-9.3245307826833-0.304958141260265
35-8.8-7.757446498308290.159520256046462-10.00207375773821.04255350169171
36-9.6-7.90488399161076-0.507535109077162-10.78758089931211.69511600838924
37-11.5-11.2111100010039-0.215801958110081-11.57308804088600.288889998996066
38-11-9.44896831621618-0.473503346178176-12.07752833760561.55103168378382
39-14.9-17.1322799474605-0.0857514182141423-12.5819686343253-2.23227994746055
40-16.2-19.4433872105998-0.335310164495763-12.6213026249044-3.24338721059984
41-14.4-16.37267697635460.233313591838099-12.6606366154835-1.97267697635462
42-17.3-22.59015341551230.219546022093760-12.2293926065815-5.29015341551229
43-15.7-19.79853967554920.196688273228663-11.7981485976795-4.09853967554921
44-12.6-14.68621900309110.416253200419578-10.9300341973285-2.08621900309112
45-9.4-9.201172532075880.46309232905335-10.06191979697750.198827467924117
46-8.1-7.29195941577546-0.0705110760564296-8.83752950816810.808040584224536
47-5.4-3.346381036687720.159520256046462-7.613139219358742.05361896331228
48-4.6-2.41107625730022-0.507535109077162-6.281388633622622.18892374269978
49-4.9-4.63455999400342-0.215801958110081-4.94963804788650.265440005996577
50-4-3.67906891492706-0.473503346178176-3.847427738894760.320931085072940
51-3.1-3.36903115188283-0.0857514182141423-2.74521742990303-0.269031151882828
52-1.3-0.197844358175629-0.335310164495763-2.066845477328611.10215564182437
5301.155159932916090.233313591838099-1.388473524754181.15515993291609
54-0.40.06113684707296220.219546022093760-1.080682869166720.461136847072962
5536.57620394035060.196688273228663-0.7728922135792593.57620394035060
560.41.168582158867250.416253200419578-0.7848353592868260.768582158867248
571.22.733686175941040.46309232905335-0.7967785049943921.53368617594104
580.62.47164671475213-0.0705110760564296-1.201135638695701.87164671475213
59-1.3-1.154027483649450.159520256046462-1.605492772397010.145972516350549
60-3.2-3.57879764346402-0.507535109077162-2.31366724745882-0.378797643464023
61-1.8-0.362356319369298-0.215801958110081-3.021841722520621.43764368063070
62-3.6-3.02603356136981-0.473503346178176-3.700463092452020.573966438630192
63-4.2-3.93516411940245-0.0857514182141423-4.379084462383410.264835880597554
64-6.9-8.78371179204647-0.335310164495763-4.68097804345777-1.88371179204647
65-8-11.25044196730600.233313591838099-4.98287162453213-3.25044196730597
66-7.5-10.38776156568380.219546022093760-4.83178445640993-2.88776156568383
67-8.2-11.91599098494090.196688273228663-4.68069728828774-3.71599098494092
68-7.6-11.51815604307990.416253200419578-4.09809715733969-3.91815604307988
69-3.7-4.34759530266170.46309232905335-3.51549702639165-0.647595302661703
70-1.7-0.813581416936879-0.0705110760564296-2.515907507006690.886418583063121
71-0.7-0.04320226842472540.159520256046462-1.516317987621740.656797731575275
720.21.21911050007992-0.507535109077162-0.311575391002761.01911050007992
730.60.522634752493866-0.2158019581100810.893167205616216-0.0773652475061344
742.22.92633478746995-0.4735033461781761.947168558708230.72633478746995
753.33.68458150641390-0.08575141821414233.001169911800240.384581506413905
765.37.19542051539937-0.3353101644957633.73988964909641.89542051539937
775.56.288077021769340.2333135918380994.478609386392560.788077021769345
786.37.414189868843670.2195460220937604.966264109062571.11418986884367
797.79.749392895038750.1966882732286635.453918831732582.04939289503875
806.56.894729580311330.4162532004195785.68901721926910.394729580311325
815.54.612792064141040.463092329053355.92411560680561-0.88720793585896
826.97.88562514143878-0.07051107605642965.984885934617650.985625141438775
835.75.194823481523840.1595202560464626.0456562624297-0.505176518476162
846.98.23439921948231-0.5075351090771626.073135889594851.33439921948231
856.16.31518644135008-0.2158019581100816.100615516760.215186441350077
864.84.02476393717814-0.4735033461781766.04873940900004-0.775236062821863
873.71.48888811697407-0.08575141821414235.99686330124007-2.21111188302593
885.86.16392133660161-0.3353101644957635.771388827894150.363921336601612
896.87.820772053613670.2333135918380995.545914354548231.02077205361367
908.511.59062251564920.2195460220937605.189831462257033.09062251564921
917.29.36956315680550.1966882732286634.833748569965842.16956315680550
9255.144344625260580.4162532004195784.439402174319840.144344625260580
934.74.891851892272810.463092329053354.045055778673840.191851892272806
942.31.15112458061839-0.07051107605642963.51938649543804-1.14887541938161
952.41.64676253175130.1595202560464622.99371721220224-0.753237468248701
960.1-1.59948626831758-0.5075351090771622.30702137739474-1.69948626831758
971.92.39547641552283-0.2158019581100811.620325542587250.495476415522833
981.73.08707286775725-0.4735033461781760.7864304784209221.38707286775725
9924.13321600395955-0.0857514182141423-0.0474645857454042.13321600395955
100-1.9-2.05811216119711-0.335310164495763-1.40657767430713-0.158112161197111
1010.53.532377171030750.233313591838099-2.765690762868853.03237717103075
102-1.32.115415694414280.219546022093760-4.934961716508043.41541569441428
103-3.30.3075443969185750.196688273228663-7.104232670147243.60754439691858
104-2.83.817410522004490.416253200419578-9.833663722424076.6174105220045
105-8-3.899997554352440.46309232905335-12.56309477470094.10000244564756
106-13.9-12.4595485141452-0.0705110760564296-15.26994040979831.44045148585477
107-21.9-25.98273421115070.159520256046462-17.9767860448958-4.08273421115068
108-28.8-36.9512370486469-0.507535109077162-20.141227842276-8.15123704864686
109-27.6-32.6785284022338-0.215801958110081-22.3056696396562-5.07852840223375
110-31.4-38.8698703815298-0.473503346178176-23.456626272292-7.46987038152982
111-31.8-38.906665676858-0.0857514182141423-24.6075829049278-7.10666567685802
112-29.4-34.1199665871678-0.335310164495763-24.3447232483364-4.71996658716784
113-27.6-31.35145000009310.233313591838099-24.0818635917450-3.75145000009314
114-23.6-24.8723077661880.219546022093760-22.5472382559058-1.27230776618799
115-22.8-24.78407535316210.196688273228663-21.0126129200666-1.98407535316207
116-18.2-17.94628229867740.416253200419578-18.86997090174210.253717701322554
117-17.8-19.33576344563570.46309232905335-16.7273288834177-1.53576344563568
118-14.2-13.7288951971180-0.0705110760564296-14.60059372682550.471104802881968
119-8.8-5.285661685813060.159520256046462-12.47385857023343.51433831418694
120-7.9-4.46762878417405-0.507535109077162-10.82483610674883.43237121582595
121-7-4.60838439862574-0.215801958110081-9.175813643264182.39161560137426
122-7-5.32648291902813-0.473503346178176-8.200013734793691.67351708097187
123-3.60.109965244537344-0.0857514182141423-7.22421382632323.70996524453734
124-2.41.98467659902579-0.335310164495763-6.449366434530024.38467659902579
125-4.9-4.358794549101260.233313591838099-5.674519042736840.541205450898744
126-7.7-10.67752525192250.219546022093760-4.94202077017123-2.97752525192253
127-6.5-8.987165775623050.196688273228663-4.20952249760561-2.48716577562305
128-5.1-7.066514193703290.416253200419578-3.54973900671629-1.96651419370329
129-3.4-4.373136813226380.46309232905335-2.88995551582697-0.973136813226377
130-2.8-3.25591861377560-0.0705110760564296-2.27357031016797-0.455918613775596
1310.83.097664848462510.159520256046462-1.657185104508982.29766484846251
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/1r1nf1293188539.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/1r1nf1293188539.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/2r1nf1293188539.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/2r1nf1293188539.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/3kb501293188539.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293188430amkdieqo9wx6c27/3kb501293188539.ps (open in new window)


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