Home » date » 2010 » Dec » 09 »

*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: Thu, 09 Dec 2010 19:47:08 +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/09/t12919238962oy2d5p0cgo0ec3.htm/, Retrieved Thu, 09 Dec 2010 20:45:00 +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/09/t12919238962oy2d5p0cgo0ec3.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 «
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 294563
 
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'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1286602288161.5179036248072.7499757138276969.7321206621559.51790362428
2283042285425.0070940423522.40905719658277136.5838487612383.00709404238
3276687278185.215906629-2114.65148348892277303.435576861498.21590662876
4277915278239.1288173455.4000318274953277535.471150832324.12881734001
5277128274606.4399476131882.05332758186277767.506724805-2521.5600523866
6277103275198.629758237964.914519660636278042.455722102-1904.37024176295
7275037274456.221279250-2699.62599864949278317.4047194-580.778720750357
8270150266029.831735391-4329.99327508780278600.161539697-4120.16826460941
9267140265718.243502411-10321.1618624054278882.918359995-1421.75649758917
10264993263396.193810363-12704.8460341884279294.652223826-1596.80618963728
11287259286744.5406412988067.07327104521279706.386087657-514.459358702006
12291186292666.1850019539605.68017450436280100.1348235421480.18500195321
13292300296033.3664648588072.7499757138280493.8835594283733.36646485812
14288186292018.5997010713522.40905719658280830.9912417333832.59970107087
15281477283900.552559452-2114.65148348892281168.0989240372423.5525594519
16282656283843.98947915055.4000318274953281412.6104890221187.98947915033
17280190276840.8246184111882.05332758186281657.122054007-3349.17538158916
18280408278213.284308297964.914519660636281637.801172042-2194.71569170279
19276836274753.145708572-2699.62599864949281618.480290077-2082.85429142753
20275216273602.102193194-4329.99327508780281159.891081894-1613.89780680626
21274352278323.859988694-10321.1618624054280701.3018737113971.85998869425
22271311275549.685790345-12704.8460341884279777.1602438434238.68579034525
23289802292683.9081149808067.07327104521278853.0186139752881.90811497957
24290726294474.5686452029605.68017450436277371.7511802943748.5686452018
25292300300636.7662776748072.7499757138275890.4837466138336.76627767371
26278506279749.5111758043522.40905719658273740.0797669991243.51117580396
27269826270176.975696102-2114.65148348892271589.675787386350.975696102483
28265861262766.78933172155.4000318274953268899.810636452-3094.21066827927
29269034269976.0011869011882.05332758186266209.945485517942.001186901063
30264176263927.185933852964.914519660636263459.899546487-248.814066147897
31255198252385.772391192-2699.62599864949260709.853607457-2812.22760880788
32253353252741.864693344-4329.99327508780258294.128581744-611.135306656477
33246057246556.758306374-10321.1618624054255878.403556031499.75830637422
34235372229446.369117019-12704.8460341884254002.476917170-5925.63088298129
35258556256918.3764506468067.07327104521252126.550278308-1637.62354935351
36260993261789.0003694579605.68017450436250591.319456038796.000369457353
37254663252197.1613905188072.7499757138249056.088633768-2465.83860948207
38250643250030.4193258393522.40905719658247733.171616964-612.580674161029
39243422242548.396883328-2114.65148348892246410.254600161-873.60311667173
40247105248855.71279596755.4000318274953245298.8871722051750.71279596712
41248541251012.4269281681882.05332758186244187.519744252471.42692816808
42245039245802.454981591964.914519660636243310.630498749763.454981590738
43237080234425.884745402-2699.62599864949242433.741253247-2654.11525459768
44237085236461.42867196-4329.99327508780242038.564603128-623.57132803998
45225554219785.773909397-10321.1618624054241643.387953008-5768.22609060301
46226839224142.943795701-12704.8460341884242239.902238487-2696.05620429869
47247934244964.5102049898067.07327104521242836.416523966-2969.48979501106
48248333242237.6479139299605.68017450436244822.671911566-6095.35208607063
49246969239056.3227251198072.7499757138246808.927299167-7912.67727488055
50245098236652.0038145963522.40905719658250021.587128207-8445.99618540352
51246263241406.404526242-2114.65148348892253234.246957247-4856.59547375821
52255765254274.05091698755.4000318274953257200.549051185-1490.94908301270
53264319265589.0955272951882.05332758186261166.8511451231270.09552729491
54268347270608.934790047964.914519660636265120.1506902922261.93479004735
55273046279718.175763189-2699.62599864949269073.4502354616672.1757631888
56273963279189.655347785-4329.99327508780273066.3379273035226.65534778452
57267430268121.936243260-10321.1618624054277059.225619146691.936243259523
58271993275642.256836726-12704.8460341884281048.5891974623649.25683672598
59292710292314.9739531768067.07327104521285037.952775779-395.026046824176
60295881293197.3655435429605.68017450436288958.954281954-2683.63445645798
61294563288173.2942361588072.7499757138292879.955788128-6389.70576384215
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/1xttw1291924025.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/1xttw1291924025.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/28ksz1291924025.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/28ksz1291924025.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/38ksz1291924025.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919238962oy2d5p0cgo0ec3/38ksz1291924025.ps (open in new window)


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