Home » date » 2010 » Dec » 29 »

*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: Wed, 29 Dec 2010 21:07:38 +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/29/t1293656745adbzixhb86xjik3.htm/, Retrieved Wed, 29 Dec 2010 22:05:50 +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/29/t1293656745adbzixhb86xjik3.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 «
16 17 23 24 27 31 40 47 43 60 64 65 65 55 57 57 57 65 69 70 71 71 73 68 65 57 41 21 21 17 9 11 6 -2 0 5 3 7 4 8 9 14 12 12 7 15 14 19 39 12 11 17 16 25 24 28 25 31 24 24
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1169.228798570559967.5696029965424215.2015984328976-6.77120142944004
21715.6639420844331-0.91815360939878219.2542115249657-1.33605791556694
32326.499095139531-3.8059197565648523.30682461703383.49909513953101
42426.5211589442402-5.7955824804885727.27442353624842.5211589442402
52728.1432166059672-5.3852390614300731.24202245546291.14321660596719
63127.9933721894237-1.1079080985264335.1145359091027-3.00662781057630
74041.8435289491952-0.83057831193783738.98704936274261.84352894919524
84749.46821430686621.8064477671230742.72533792601072.46821430686619
94341.0928974426089-1.5565239318878046.4636264892789-1.90710255739107
106067.47253433042652.9686022942790449.55886337529457.47253433042648
116472.45216272263242.8937370160575752.65410026131018.45216272263234
126570.73755515541614.1615063428663455.10093850171765.73755515541605
136564.88262026133247.5696029965424257.5477767421251-0.117379738667559
145551.4446786264436-0.91815360939878259.4734749829552-3.55532137355643
155756.4067465327796-3.8059197565648561.3991732237853-0.593253467220443
165757.1084068166681-5.7955824804885762.68717566382050.108406816668079
175755.4100609575744-5.3852390614300763.9751781038557-1.58993904242561
186566.5281392357107-1.1079080985264364.57976886281581.52813923571065
196973.646218690162-0.83057831193783765.18435962177594.64621869016196
207073.40994113426221.8064477671230764.78361109861473.4099411342622
217179.1736613564342-1.5565239318878064.38286257545368.17366135643422
227176.86035053734652.9686022942790462.17104716837455.86035053734646
237383.1470312226472.8937370160575759.959231761295410.147031222647
246875.95806051105554.1615063428663455.88043314607817.95806051105556
256570.62876247259687.5696029965424251.80163453086085.6287624725968
265768.5128612552755-0.91815360939878246.405292354123311.5128612552755
274144.796969579179-3.8059197565648541.00895017738593.79696957917898
282112.7857986727298-5.7955824804885735.0097838077587-8.21420132727016
292118.3746216232985-5.3852390614300729.0106174381316-2.62537837670151
301711.6870666610641-1.1079080985264323.4208414374623-5.31293333893589
3190.999512875144775-0.83057831193783717.8310654367931-8.00048712485522
32116.35376038585811.8064477671230713.8397918470188-4.64623961414189
3363.70800567464321-1.556523931887809.84851825724458-2.29199432535679
34-2-14.99630653303952.968602294279048.02770423876046-12.9963065330395
350-9.10062723633392.893737016057576.20689022027634-9.1006272363339
365-0.1590071438699114.161506342866345.99750080100357-5.15900714386991
373-7.357714378273247.569602996542425.78811138173081-10.3577143782732
3878.5195560071401-0.9181536093987826.398597602258681.51955600714010
3944.7968359337783-3.805919756564857.009083822786550.7968359337783
40813.7298036139462-5.795582480488578.06577886654245.72980361394617
41914.2627651511318-5.385239061430079.122473910298235.26276515113184
421418.6752090893764-1.1079080985264310.43269900915014.67520908937636
431213.0876542039359-0.83057831193783711.74292410800191.08765420393592
44129.43565989327011.8064477671230712.7578923396068-2.5643401067299
4571.78366336067606-1.5565239318878013.7728605712117-5.21633663932394
461512.51287216539752.9686022942790414.5185255403235-2.48712783460250
47149.842072474507252.8937370160575715.2641905094352-4.15792752549275
481917.61527934299994.1615063428663416.2232143141338-1.38472065700010
493953.24815888462527.5696029965424217.182238118832314.2481588846252
50126.44415179136552-0.91815360939878218.4740018180333-5.55584820863448
51116.04015423933067-3.8059197565648519.7657655172342-4.95984576066933
521719.1941171911601-5.7955824804885720.60146528932852.19411719116008
531615.9480740000073-5.3852390614300721.4371650614228-0.0519259999927186
542529.0114424867354-1.1079080985264322.09646561179114.01144248673537
552426.0748121497785-0.83057831193783722.75576616215932.0748121497785
562830.80243785692341.8064477671230723.39111437595352.80243785692343
572527.5300613421401-1.5565239318878024.02646258974762.53006134214015
583134.4107904081892.9686022942790424.62060729753203.41079040818900
592419.89151097862622.8937370160575725.2147520053163-4.10848902137382
602418.0850992375134.1615063428663425.7533944196206-5.91490076248698
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/168hx1293656850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/168hx1293656850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/2z0gi1293656850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/2z0gi1293656850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/3z0gi1293656850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/3z0gi1293656850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/4s9fl1293656850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656745adbzixhb86xjik3/4s9fl1293656850.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 12 ;
 
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