Home » date » 2010 » Dec » 15 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 15 Dec 2010 12:10:10 +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/15/t1292414909dly4l6bgldafnaw.htm/, Retrieved Wed, 15 Dec 2010 13:08:29 +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/15/t1292414909dly4l6bgldafnaw.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13,2 13,8 16,2 14,7 13,9 16,0 14,4 12,3 15,9 15,9 15,5 15,1 14,5 15,1 17,4 16,2 15,6 17,2 14,9 13,8 17,5 16,2 17,5 16,6 16,2 16,6 19,6 15,9 18,0 18,3 16,3 14,9 18,2 18,4 18,5 16,0 17,4 17,2 19,6 17,2 18,3 19,3 18,1 16,2 18,4 20,5 19,0 16,5 18,7 19,0 19,2 20,5 19,3 20,6 20,1 16,1 20,4 19,7 15,6 14,4 13,9 14,3 15,3 14,4 13,8 15,7 14,7 12,5 16,2 16,1 16 15,8 15,2
 
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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
113.2NANA-0.803125NA
213.8NANA-0.507291666666666NA
316.2NANA1.26854166666667NA
414.7NANA-0.115625000000000NA
513.9NANA0.0385416666666663NA
616NANA1.24854166666667NA
714.414.632708333333314.7958333333333-0.163125-0.232708333333333
812.313.042708333333314.9041666666667-1.86145833333333-0.742708333333331
915.915.42937515.00833333333330.4210416666666660.470625000000002
1015.916.333541666666715.12083333333331.21270833333333-0.433541666666663
1115.515.63437515.25416666666670.380208333333333-0.134374999999997
1215.114.256041666666715.375-1.118958333333330.843958333333337
1314.514.642708333333315.4458333333333-0.803125-0.142708333333330
1415.115.02187515.5291666666667-0.5072916666666660.0781250000000018
1517.416.92687515.65833333333331.268541666666670.473125000000001
1616.215.62187515.7375-0.1156250000000000.578125000000002
1715.615.87187515.83333333333330.0385416666666663-0.271875000000001
1817.217.227708333333315.97916666666671.24854166666667-0.027708333333333
1914.915.94937516.1125-0.163125-1.04937500000000
2013.814.38437516.2458333333333-1.86145833333333-0.584375
2117.516.821041666666716.40.4210416666666660.678958333333334
2216.217.69187516.47916666666671.21270833333333-1.491875
2317.516.94687516.56666666666670.3802083333333330.553125000000001
2416.615.593541666666716.7125-1.118958333333331.00645833333333
2516.216.013541666666716.8166666666667-0.8031250.186458333333334
2616.616.413541666666716.9208333333333-0.5072916666666660.186458333333338
2719.618.26437516.99583333333331.268541666666671.335625
2815.917.001041666666717.1166666666667-0.115625000000000-1.10104166666666
291817.288541666666717.250.03854166666666630.711458333333333
3018.318.515208333333317.26666666666671.24854166666667-0.215208333333333
3116.317.128541666666717.2916666666667-0.163125-0.828541666666666
3214.915.505208333333317.3666666666667-1.86145833333333-0.605208333333334
3318.217.812708333333317.39166666666670.4210416666666660.387291666666663
3418.418.658541666666717.44583333333331.21270833333333-0.258541666666666
3518.517.892708333333317.51250.3802083333333330.607291666666669
361616.447708333333317.5666666666667-1.11895833333333-0.447708333333335
3717.416.880208333333317.6833333333333-0.8031250.519791666666666
3817.217.305208333333317.8125-0.507291666666666-0.105208333333334
3919.619.143541666666717.8751.268541666666670.456458333333334
4017.217.855208333333317.9708333333333-0.115625000000000-0.655208333333331
4118.318.117708333333318.07916666666670.03854166666666630.182291666666668
4219.319.36937518.12083333333331.24854166666667-0.0693749999999973
4318.118.032708333333318.1958333333333-0.1631250.0672916666666659
4416.216.463541666666718.325-1.86145833333333-0.263541666666665
4518.418.80437518.38333333333330.421041666666666-0.404374999999998
4620.519.71687518.50416666666671.212708333333330.783125000000005
471919.063541666666718.68333333333330.380208333333333-0.0635416666666657
4816.517.660208333333318.7791666666667-1.11895833333333-1.16020833333334
4918.718.113541666666718.9166666666667-0.8031250.586458333333333
501918.488541666666718.9958333333333-0.5072916666666660.511458333333334
5119.220.343541666666719.0751.26854166666667-1.14354166666667
5220.519.00937519.125-0.1156250000000001.490625
5319.318.988541666666718.950.03854166666666630.311458333333334
5420.619.96937518.72083333333331.248541666666670.630625000000002
5520.118.270208333333318.4333333333333-0.1631251.82979166666667
5616.116.176041666666718.0375-1.86145833333333-0.076041666666665
5720.418.100208333333317.67916666666670.4210416666666662.29979166666666
5819.718.475208333333317.26251.212708333333331.22479166666666
5915.617.15937516.77916666666670.380208333333333-1.559375
6014.415.22687516.3458333333333-1.11895833333333-0.826874999999998
6113.915.113541666666715.9166666666667-0.803125-1.21354166666666
6214.315.03437515.5416666666667-0.507291666666666-0.734374999999998
6315.316.485208333333315.21666666666671.26854166666667-1.18520833333333
6414.414.776041666666714.8916666666667-0.115625000000000-0.376041666666666
6513.814.79687514.75833333333330.0385416666666663-0.996875
6615.716.08187514.83333333333331.24854166666667-0.381875000000001
6714.714.782708333333314.9458333333333-0.163125-0.0827083333333345
6812.5NANA-1.86145833333333NA
6916.2NANA0.421041666666666NA
7016.1NANA1.21270833333333NA
7116NANA0.380208333333333NA
7215.8NANA-1.11895833333333NA
7315.2NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/1n0ff1292415007.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/1n0ff1292415007.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/2n0ff1292415007.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/2n0ff1292415007.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/3x9ei1292415007.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/3x9ei1292415007.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/4x9ei1292415007.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292414909dly4l6bgldafnaw/4x9ei1292415007.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; 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