Home » date » 2009 » Dec » 02 »

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: Wed, 02 Dec 2009 08:59:32 -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/02/t12597697662m17foyfkrc0b1z.htm/, Retrieved Wed, 02 Dec 2009 17:02:51 +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/02/t12597697662m17foyfkrc0b1z.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 «
108.5 112.3 116.6 115.5 120.1 132.9 128.1 129.3 132.5 131 124.9 120.8 122 122.1 127.4 135.2 137.3 135 136 138.4 134.7 138.4 133.9 133.6 141.2 151.8 155.4 156.6 161.6 160.7 156 159.5 168.7 169.9 169.9 185.9 190.8 195.8 211.9 227.1 251.3 256.7 251.9 251.2 270.3 267.2 243 229.9 187.2 178.2 175.2 192.4 187 184 194.1 212.7 217.5 200.5 205.9 196.5 206.3
 
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
1108.5NANA0.937224522886773NA
2112.3NANA0.941763741248138NA
3116.6NANA0.963321605840951NA
4115.5NANA1.00921056998898NA
5120.1NANA1.03211747816283NA
6132.9NANA1.01830923694087NA
7128.1124.569972229460123.2708333333331.010538899275661.02833771018298
8129.3126.990738457946124.2416666666671.02212681031281.01818448786183
9132.5130.354952368196125.11.042006014134261.01645543642826
10131131.975287161921126.3708333333331.044349267000600.992610077364523
11124.9127.549677178707127.9083333333330.9971959907124170.979226312152911
12120.8126.374548580194128.71250.981835863495730.955888676613893
13122121.023021619933129.1291666666670.9372245228867731.00807266557213
14122.1122.276249754305129.83750.9417637412481380.998558593719882
15127.4125.528832921125130.3083333333330.9633216058409511.01490627320698
16135.2131.912231585643130.7083333333331.009210569988981.02492390868411
17137.3135.611635651611131.3916666666671.032117478162831.01244999619890
18135134.722312047278132.31.018309236940871.00206118755314
19136135.041681573204133.6333333333331.010538899275661.00709646396307
20138.4138.672796127480135.6708333333331.02212681031280.998032807190036
21134.7143.874980401588138.0751.042006014134260.936229493300516
22138.4146.348143949017140.1333333333331.044349267000600.945690162276428
23133.9141.639225530815142.03750.9971959907124170.945359588759321
24133.6141.503002843558144.1208333333330.981835863495730.94414957502849
25141.2136.858210954541146.0250.9372245228867731.03172472455380
26151.8139.133820722647147.73750.9417637412481381.09103594806472
27155.4144.530351596337150.0333333333330.9633216058409511.07520668346550
28156.6154.169529697941152.76251.009210569988981.01576491999957
29161.6160.571676665182155.5751.032117478162831.00640413898749
30160.7162.169988937988159.2541666666671.018309236940870.990935505714622
31156165.22311003157163.51.010538899275660.94417784515854
32159.5171.104028046363167.41.02212681031280.932181444359576
33168.7178.795206950262171.58751.042006014134260.943537597442026
34169.9184.72362805601176.8791666666671.044349267000600.919752398694144
35169.9183.039479078559183.5541666666670.9971959907124170.928215054234724
36185.9187.817018721204191.2916666666670.981835863495730.989793157541012
37190.8186.777132104798199.28750.9372245228867731.02153833207453
38195.8195.043194828078207.1041666666670.9417637412481381.00388019265471
39211.9207.266671176729215.1583333333330.9633216058409511.02235443256248
40227.1225.503896819995223.4458333333331.009210569988981.00707794057004
41251.3237.950384100947230.5458333333331.032117478162831.05610251880657
42256.7239.735452106805235.4251.018309236940871.07076361774660
43251.9239.607194175752237.1083333333331.010538899275661.05130399304802
44251.2241.451905766141236.2251.02212681031281.04037281960118
45270.3243.790332081886233.96251.042006014134261.10873961937592
46267.2241.231626311301230.98751.044349267000601.10764912580404
47243226.226375442996226.86250.9971959907124171.0741453092026
48229.9217.137092194845221.1541666666670.981835863495731.05877810960875
49187.2202.174949995392215.7166666666670.9372245228867730.925930734763465
50178.2199.375308037819211.7041666666670.9417637412481380.893791722524624
51175.2200.274561854334207.90.9633216058409510.874799067728975
52192.4204.789849870972202.9208333333331.009210569988980.939499687710217
53187204.974230673645198.5958333333331.032117478162830.912309802970975
54184199.24068811779195.6583333333331.018309236940870.923506145949568
55194.1197.118244039958195.06251.010538899275660.984688154794307
56212.7NANA1.0221268103128NA
57217.5NANA1.04200601413426NA
58200.5NANA1.04434926700060NA
59205.9NANA0.997195990712417NA
60196.5NANA0.98183586349573NA
61206.3NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/18cv21259769569.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/18cv21259769569.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/29jbf1259769569.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/29jbf1259769569.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/3pze71259769569.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t12597697662m17foyfkrc0b1z/3pze71259769569.ps (open in new window)


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