Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 09:24:13 -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/03/t1259858020f2t92j8gjp6qh6k.htm/, Retrieved Thu, 03 Dec 2009 17:33:45 +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/03/t1259858020f2t92j8gjp6qh6k.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 «
22 22 20 21 20 21 21 21 19 21 21 22 19 24 22 22 22 24 22 23 24 21 20 22 23 23 22 20 21 21 20 20 17 18 19 19 20 21 20 21 19 22 20 18 16 17 18 19 18 20 21 18 19 19 19 21 19 19 17 16 16 17 16 15 16 16 16 18 19 16 16 16
 
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
122NANA-0.493055555555556NA
222NANA1.37361111111111NA
320NANA0.598611111111111NA
421NANA-0.359722222222221NA
520NANA-0.0763888888888878NA
621NANA1.01527777777778NA
72121.006944444444420.79166666666670.215277777777778-0.00694444444444642
82121.256944444444420.750.506944444444444-0.256944444444446
91919.898611111111120.9166666666667-1.01805555555556-0.898611111111109
102120.306944444444421.0416666666667-0.7347222222222210.693055555555553
112120.315277777777821.1666666666667-0.851388888888890.68472222222222
122221.198611111111121.375-0.1763888888888890.80138888888889
131921.048611111111121.5416666666667-0.493055555555556-2.04861111111111
142423.040277777777821.66666666666671.373611111111110.959722222222222
152222.556944444444421.95833333333330.598611111111111-0.556944444444447
162221.806944444444422.1666666666667-0.3597222222222210.193055555555556
172222.048611111111122.125-0.0763888888888878-0.0486111111111107
182423.098611111111122.08333333333331.015277777777780.901388888888889
192222.465277777777822.250.215277777777778-0.465277777777779
202322.881944444444422.3750.5069444444444440.118055555555561
212421.315277777777822.3333333333333-1.018055555555562.68472222222222
222121.515277777777822.25-0.734722222222221-0.515277777777779
232021.273611111111122.125-0.85138888888889-1.27361111111111
242221.781944444444421.9583333333333-0.1763888888888890.218055555555559
252321.256944444444421.75-0.4930555555555561.74305555555556
262322.915277777777821.54166666666671.373611111111110.0847222222222257
272221.723611111111121.1250.5986111111111110.276388888888889
282020.348611111111120.7083333333333-0.359722222222221-0.348611111111111
292120.465277777777820.5416666666667-0.07638888888888780.534722222222225
302121.390277777777820.3751.01527777777778-0.390277777777776
312020.340277777777820.1250.215277777777778-0.340277777777775
322020.423611111111119.91666666666670.506944444444444-0.423611111111107
331718.731944444444419.75-1.01805555555556-1.73194444444444
341818.973611111111119.7083333333333-0.734722222222221-0.973611111111108
351918.815277777777819.6666666666667-0.851388888888890.18472222222222
361919.448611111111119.625-0.176388888888889-0.448611111111109
372019.173611111111119.6666666666667-0.4930555555555560.82638888888889
382120.956944444444419.58333333333331.373611111111110.0430555555555543
392020.056944444444419.45833333333330.598611111111111-0.0569444444444436
402119.015277777777819.375-0.3597222222222211.98472222222222
411919.215277777777819.2916666666667-0.0763888888888878-0.215277777777779
422220.265277777777819.251.015277777777781.73472222222222
432019.381944444444419.16666666666670.2152777777777780.618055555555557
441819.548611111111119.04166666666670.506944444444444-1.54861111111111
451618.023611111111119.0416666666667-1.01805555555556-2.02361111111111
461718.223611111111118.9583333333333-0.734722222222221-1.22361111111111
471817.981944444444418.8333333333333-0.851388888888890.0180555555555557
481918.531944444444418.7083333333333-0.1763888888888890.468055555555555
491818.048611111111118.5416666666667-0.493055555555556-0.0486111111111072
502019.998611111111118.6251.373611111111110.00138888888888999
512119.473611111111118.8750.5986111111111111.52638888888889
521818.723611111111119.0833333333333-0.359722222222221-0.723611111111111
531919.048611111111119.125-0.0763888888888878-0.0486111111111072
541919.973611111111118.95833333333331.01527777777778-0.973611111111111
551918.965277777777818.750.2152777777777780.0347222222222179
562119.048611111111118.54166666666670.5069444444444441.95138888888889
571917.190277777777818.2083333333333-1.018055555555561.80972222222222
581917.140277777777817.875-0.7347222222222211.85972222222222
591716.773611111111117.625-0.851388888888890.226388888888888
601617.198611111111117.375-0.176388888888889-1.19861111111111
611616.631944444444417.125-0.493055555555556-0.631944444444446
621718.248611111111116.8751.37361111111111-1.24861111111111
631617.348611111111116.750.598611111111111-1.34861111111111
641516.265277777777816.625-0.359722222222221-1.26527777777778
651616.381944444444416.4583333333333-0.0763888888888878-0.381944444444443
661617.431944444444416.41666666666671.01527777777778-1.43194444444444
6716NANA0.215277777777778NA
6818NANA0.506944444444444NA
6919NANA-1.01805555555556NA
7016NANA-0.734722222222221NA
7116NANA-0.85138888888889NA
7216NANA-0.176388888888889NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/18l2k1259857449.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/18l2k1259857449.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/2xl3i1259857449.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/2xl3i1259857449.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/38qro1259857449.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/38qro1259857449.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/47t0d1259857449.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259858020f2t92j8gjp6qh6k/47t0d1259857449.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