Home » date » 2009 » Dec » 21 »

Paper

*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: Mon, 21 Dec 2009 14:42:08 -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/21/t1261431823ld7mae6awcowg5j.htm/, Retrieved Mon, 21 Dec 2009 22:43:48 +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/21/t1261431823ld7mae6awcowg5j.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 «
25,6 23,7 22 21,3 20,7 20,4 20,3 20,4 19,8 19,5 23,1 23,5 23,5 22,9 21,9 21,5 20,5 20,2 19,4 19,2 18,8 18,8 22,6 23,3 23 21,4 19,9 18,8 18,6 18,4 18,6 19,9 19,2 18,4 21,1 20,5 19,1 18,1 17 17,1 17,4 16,8 15,3 14,3 13,4 15,3 22,1 23,7 22,2 19,5 16,6 17,3 19,8 21,2 21,5 20,6 19,1 19,6 23,5 24
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
125.6NANA2.35920138888889NA
223.7NANA0.869618055555555NA
322NANA-0.750173611111111NA
421.3NANA-0.91892361111111NA
520.7NANA-0.524131944444444NA
620.4NANA-0.458506944444445NA
720.320.105034722222221.6041666666667-1.499131944444440.194965277777779
820.420.113368055555621.4833333333333-1.369965277777780.286631944444448
919.819.525868055555621.4458333333333-1.919965277777780.274131944444445
1019.519.827951388888921.45-1.62204861111111-0.327951388888888
1123.124.103993055555621.452.65399305555556-1.00399305555556
1223.524.613368055555621.43333333333333.18003472222222-1.11336805555556
1323.523.746701388888921.38752.35920138888889-0.246701388888887
1422.922.169618055555621.30.8696180555555550.730381944444442
1521.920.458159722222221.2083333333333-0.7501736111111111.44184027777778
1621.520.218576388888921.1375-0.918923611111111.28142361111111
1720.520.563368055555621.0875-0.524131944444444-0.06336805555555
1820.220.599826388888921.0583333333333-0.458506944444445-0.399826388888886
1919.419.530034722222221.0291666666667-1.49913194444444-0.130034722222224
2019.219.575868055555620.9458333333333-1.36996527777778-0.375868055555554
2118.818.880034722222220.8-1.91996527777778-0.0800347222222229
2218.818.982118055555520.6041666666667-1.62204861111111-0.182118055555549
2322.623.066493055555620.41252.65399305555556-0.466493055555556
2423.323.438368055555620.25833333333333.18003472222222-0.138368055555553
252322.509201388888920.152.359201388888890.49079861111111
2621.421.015451388888920.14583333333330.8696180555555550.384548611111111
2719.919.441493055555620.1916666666667-0.7501736111111110.458506944444444
2818.819.272743055555620.1916666666667-0.91892361111111-0.472743055555554
2918.619.588368055555620.1125-0.524131944444444-0.988368055555554
3018.419.474826388888919.9333333333333-0.458506944444445-1.07482638888889
3118.618.155034722222219.6541666666667-1.499131944444440.444965277777779
3219.917.984201388888919.3541666666667-1.369965277777781.91579861111111
3319.217.175868055555619.0958333333333-1.919965277777782.02413194444444
3418.417.282118055555618.9041666666667-1.622048611111111.11788194444444
3521.121.437326388888918.78333333333332.65399305555556-0.337326388888886
3620.521.846701388888918.66666666666673.18003472222222-1.34670138888889
3719.120.821701388888918.46252.35920138888889-1.72170138888889
3818.118.961284722222218.09166666666670.869618055555555-0.86128472222222
391716.866493055555617.6166666666667-0.7501736111111110.133506944444445
4017.116.326909722222217.2458333333333-0.918923611111110.77309027777778
4117.416.634201388888917.1583333333333-0.5241319444444440.765798611111112
4216.816.874826388888917.3333333333333-0.458506944444445-0.0748263888888872
4315.316.096701388888917.5958333333333-1.49913194444444-0.796701388888891
4414.316.413368055555617.7833333333333-1.36996527777778-2.11336805555556
4513.415.905034722222217.825-1.91996527777778-2.50503472222222
4615.316.194618055555617.8166666666667-1.62204861111111-0.894618055555554
4722.120.578993055555617.9252.653993055555561.52100694444444
4823.721.388368055555618.20833333333333.180034722222222.31163194444445
4922.221.009201388888918.652.359201388888891.19079861111111
5019.520.040451388888919.17083333333330.869618055555555-0.540451388888886
5116.618.920659722222219.6708333333333-0.750173611111111-2.32065972222222
5217.319.168576388888920.0875-0.91892361111111-1.86857638888888
5319.819.800868055555620.325-0.524131944444444-0.000868055555557135
5421.219.937326388888920.3958333333333-0.4585069444444451.26267361111111
5521.5NANA-1.49913194444444NA
5620.6NANA-1.36996527777778NA
5719.1NANA-1.91996527777778NA
5819.6NANA-1.62204861111111NA
5923.5NANA2.65399305555556NA
6024NANA3.18003472222222NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/1nigs1261431725.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/1nigs1261431725.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/2a40q1261431725.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/2a40q1261431725.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/3o2zj1261431725.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/3o2zj1261431725.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/4eth11261431725.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/21/t1261431823ld7mae6awcowg5j/4eth11261431725.ps (open in new window)


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