Home » date » 2009 » Dec » 06 »

Review WS 9: classical decomposition

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 06 Dec 2009 13:33:04 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts.htm/, Retrieved Sun, 06 Dec 2009 21:34:03 +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/2009/Dec/06/t12601316376vt410bp1e0ibts.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
2360 2214 2825 2355 2333 3016 2155 2172 2150 2533 2058 2160 2260 2498 2695 2799 2947 2930 2318 2540 2570 2669 2450 2842 3440 2678 2981 2260 2844 2546 2456 2295 2379 2479 2057 2280 2351 2276 2548 2311 2201 2725 2408 2139 1898 2537 2069 2063 2524 2437 2189 2793 2074 2622 2278 2144 2427 2139 1828 2072 1800 1758 2246 1987 1868 2514 2121
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12360NANA1.06659487570272NA
22214NANA1.00250389158119NA
32825NANA1.05149152073521NA
42355NANA1.03364226542565NA
52333NANA1.01674352949734NA
63016NANA1.1033769432302NA
721552281.831268775292356.750.968210997677010.944416894224013
821722210.40091006582364.416666666670.9348609918157960.982627174151564
921502271.095542292592370.833333333330.9579313359406360.946679679459742
1025332428.517264928852383.916666666671.018708958616641.04302326221025
1120582127.1922667674624280.8761088413375040.967472490452117
1221602376.0733286782524500.9698258484401010.90906285337648
1322602616.579437364552453.208333333331.066594875702720.863723060621578
1424982481.531299627312475.333333333331.002503891581191.00663650721438
1526952637.315982590692508.166666666671.051491520735211.02187224351958
1627992616.493121214132531.333333333331.033642265425651.06975247796607
1729472596.085145316542553.333333333331.016743529497341.13517078024830
1829302866.665246590662598.083333333331.10337694323021.02209352957575
1923182590.609892784452675.666666666670.968210997677010.894769994685907
2025402554.351849971362732.333333333330.9348609918157960.994381412266473
2125702635.987553674652751.750.9579313359406360.974966667204988
2226692792.493486601262741.208333333331.018708958616640.955776625014958
2324502378.16094527562714.458333333330.8761088413375041.03020781872106
2428422612.872473339042694.166666666670.9698258484401011.08769181389406
2534402862.651763479802683.916666666671.066594875702721.20168301428965
2626782686.167406496322679.458333333331.002503891581190.99695945737538
2729812798.325621703272661.291666666671.051491520735211.06527988625768
2822602734.414476328112645.416666666671.033642265425650.826502353452586
2928442665.011883753712621.1251.016743529497341.06716222067805
3025462848.183682791562581.333333333331.10337694323020.893903021558153
3124562432.670473788392512.541666666670.968210997677011.00959008894258
3222952290.798955361962450.416666666670.9348609918157961.00183387748986
3323792314.00288338162415.6250.9579313359406361.02808860658091
3424792444.604377233672399.708333333331.018708958616641.01407001602658
3520572080.795002711632375.041666666670.8761088413375040.98856446565826
3622802284.626833052422355.708333333330.9698258484401010.99797479702791
3723512518.408267346752361.166666666671.066594875702720.933526160346066
3822762358.557488926682352.666666666671.002503891581190.964996617926726
3925482445.900713670192326.1251.051491520735211.04174302160312
4023112386.163169735112308.51.033642265425650.968500406557085
4122012350.117939805642311.416666666671.016743529497340.936548741967405
4227252540.939178141252302.8751.10337694323021.07243810613106
4324082227.89384777972301.041666666670.968210997677011.08084144242321
4421392164.164243512242314.958333333330.9348609918157960.988372304187318
4518982209.66819537542306.708333333330.9579313359406360.85895249068268
4625372355.085327495242311.833333333331.018708958616641.07724334671909
4720692038.376732976872326.6250.8761088413375041.01502335977825
4820632247.126900246072317.041666666670.9698258484401010.918061191726242
4925242460.989909871422307.333333333331.066594875702721.02560355484427
5024372307.889271406352302.1251.002503891581191.05594320758507
5121892444.06060350892324.3751.051491520735210.895640638721187
5227932408.214204730862329.833333333331.033642265425651.15978055212582
5320742341.772170001012303.208333333331.016743529497340.885654047207804
5426222530.640993337772293.541666666671.10337694323021.0361011328366
5522782191.787645991332263.750.968210997677011.03933426404987
5621442061.641154743112205.291666666670.9348609918157961.03994819615791
5724272087.691605265622179.3750.9579313359406361.16252802563298
5821392188.356627934982148.166666666671.018708958616640.977445802340931
5918281845.0852198567821060.8761088413375040.990740145943985
6020722029.764681964432092.916666666670.9698258484401011.02080798745335
611800NA2081.875NANA
621758NANANANA
632246NANANANA
641987NANANANA
651868NANANANA
662514NANANANA
672121NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/1fe171260131582.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/1fe171260131582.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/2pvyy1260131582.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/2pvyy1260131582.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/3n0gs1260131582.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/3n0gs1260131582.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/4m0001260131582.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t12601316376vt410bp1e0ibts/4m0001260131582.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.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