Home » date » 2010 » Dec » 19 »

*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, 19 Dec 2010 13:10:43 +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/19/t1292764163aw8wa3qwh3yowdn.htm/, Retrieved Sun, 19 Dec 2010 14:09:23 +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/19/t1292764163aw8wa3qwh3yowdn.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 «
19876 45335 48674 156392 100837 101605 532850 294189 80763 105995 25045 90474 48481 50730 68694 207716 99132 104012 422632 364974 82687 66834 28408 97073 40284 24421 116346 72120 108751 91738 402216 390070 106045 110070 70668 167841 28607 95371 30605 131063 81214 85451 455196 454570 63114 74287 42350 113375
 
Output produced by software:


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


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1198768683.82316940457-102217.841414870133286.018245465-11192.1768305954
24533539748.1731120666-82851.7585992094133773.585487143-5586.82688793342
34867434109.2062292733-71022.3589580938134261.152728820-14564.7937707267
4156392173663.9208828544439.34112369675134680.73799345017271.9208828537
5100837106754.850133431-40181.1733915100135100.3232580795917.85013343129
6101605109770.419188294-42242.5551331125135682.1359448198165.41918829374
7532850614436.025556505315000.025811936136263.94863155981586.0255565047
8294189213511.328412465237778.21458826137088.456999275-80677.6715875354
98076378582.4128333753-54969.3782003671137912.965366992-2180.58716662473
10105995121917.19286252-48386.5095685443138459.31670602415922.1928625200
11250456710.95280880143-95626.620853858139005.668045057-18334.0471911986
129047461561.3777895417-19719.3587266237139105.980937082-28912.6222104583
134848159973.5475857622-102217.841414870139206.29382910711492.5475857622
145073045193.8254910827-82851.7585992094139117.933108127-5536.17450891726
156869469380.786570948-71022.3589580938139029.572387146686.786570947996
16207716272368.6445932464439.34112369675138624.01428305764652.6445932463
1799132100226.717212542-40181.1733915100138218.4561789681094.71721254187
18104012113105.224258753-42242.5551331125137161.3308743609093.22425875283
19422632394159.768618312315000.025811936136104.205569751-28472.2313816877
20364974357847.022719139237778.21458826134322.762692601-7126.97728086138
218268787802.0583849158-54969.3782003671132541.3198154515115.05838491578
226683451567.6685074001-48386.5095685443130486.841061144-15266.3314925999
232840824010.2585470211-95626.620853858128432.362306837-4397.74145297887
249707386447.9618492598-19719.3587266237127417.396877364-10625.0381507402
254028456383.4099669787-102217.841414870126402.43144789116099.4099669787
26244214464.14023002912-82851.7585992094127229.618369180-19956.8597699709
27116346175657.553667624-71022.3589580938128056.80529047059311.5536676242
28721209168.675140084774439.34112369675130631.983736218-62951.3248599152
29108751124476.011209543-40181.1733915100133207.16218196715725.0112095426
309173889251.355663373-42242.5551331125136467.199469740-2486.64433662704
31402216349704.737430552315000.025811936139727.236757512-52511.2625694481
32390070400606.99897131237778.21458826141754.78644043010536.9989713102
33106045123277.042077019-54969.3782003671143782.33612334817232.0420770193
34110070124057.460696510-48386.5095685443144469.04887203413987.4606965103
357066891806.8592331379-95626.620853858145155.76162072021138.8592331379
36167841209810.180459751-19719.3587266237145591.17826687241969.1804597514
372860713405.2465018452-102217.841414870146026.594913024-15201.7534981548
3895371127567.898778022-82851.7585992094146025.85982118832196.8987780217
3930605-13792.7657712571-71022.3589580938146025.124729351-44397.7657712571
40131063112981.1209456594439.34112369675144705.537930645-18081.8790543415
418121459223.2222595714-40181.1733915100143385.951131939-21990.7777404286
428545171327.1287471203-42242.5551331125141817.426385992-14123.8712528797
43455196455143.072548018315000.025811936140248.901640046-52.9274519823375
44454570532354.331197252237778.21458826139007.45421448877784.3311972523
456311443431.3714114377-54969.3782003671137766.006788929-19682.6285885623
467428760181.045025433-48386.5095685443136779.464543111-14105.954974567
474235044533.698556565-95626.620853858135792.9222972932183.69855656498
48113375111579.699852794-19719.3587266237134889.658873830-1795.300147206
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/149pd1292764239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/149pd1292764239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/2xi7y1292764239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/2xi7y1292764239.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/3xi7y1292764239.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292764163aw8wa3qwh3yowdn/3xi7y1292764239.ps (open in new window)


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