Home » date » 2010 » Dec » 29 »

*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, 29 Dec 2010 21:05:24 +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/29/t1293656605ldqb1axrss3uysn.htm/, Retrieved Wed, 29 Dec 2010 22:03:28 +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/29/t1293656605ldqb1axrss3uysn.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
16 17 23 24 27 31 40 47 43 60 64 65 65 55 57 57 57 65 69 70 71 71 73 68 65 57 41 21 21 17 9 11 6 -2 0 5 3 7 4 8 9 14 12 12 7 15 14 19 39 12 11 17 16 25 24 28 25 31 24 24
 
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' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
116NANA9.5546875NA
217NANA-0.330729166666666NA
323NANA-4.4453125NA
424NANA-6.45572916666667NA
527NANA-5.73697916666667NA
631NANA-0.393229166666667NA
74038.398437540.125-1.72656251.60156250000001
84744.335937543.750.5859375000000012.6640625
94344.263020833333346.75-2.48697916666667-1.26302083333334
106051.502604166666749.54166666666671.96093758.49739583333333
116456.065104166666752.16666666666673.89843757.93489583333333
126560.408854166666754.83333333333335.575520833333334.59114583333334
136567.013020833333357.45833333333339.5546875-2.01302083333333
145559.294270833333359.625-0.330729166666666-4.29427083333334
155757.304687561.75-4.4453125-0.304687499999993
165756.919270833333363.375-6.455729166666670.0807291666666714
175758.471354166666764.2083333333333-5.73697916666667-1.47135416666666
186564.315104166666764.7083333333333-0.3932291666666670.684895833333343
196963.106770833333364.8333333333333-1.72656255.89322916666667
207065.502604166666764.91666666666670.5859375000000014.49739583333334
217161.846354166666764.3333333333333-2.486979166666679.15364583333334
227164.127604166666762.16666666666671.96093756.87239583333334
237363.065104166666759.16666666666673.89843759.93489583333334
246861.242187555.66666666666675.575520833333336.7578125
256560.721354166666751.16666666666679.55468754.27864583333334
265745.877604166666746.2083333333333-0.33072916666666611.1223958333333
274136.596354166666741.0416666666667-4.44531254.40364583333334
282128.835937535.2916666666667-6.45572916666667-7.8359375
292123.471354166666729.2083333333333-5.73697916666667-2.47135416666667
301723.148437523.5416666666667-0.393229166666667-6.1484375
31916.606770833333318.3333333333333-1.7265625-7.60677083333333
321114.252604166666713.66666666666670.585937500000001-3.25260416666667
3367.554687510.0416666666667-2.48697916666667-1.5546875
34-29.919270833333337.958333333333331.9609375-11.9192708333333
35010.81510416666676.916666666666673.8984375-10.8151041666667
36511.86718756.291666666666675.57552083333333-6.8671875
37315.84635416666676.291666666666679.5546875-12.8463541666667
3876.127604166666676.45833333333333-0.3307291666666660.872395833333334
3942.096354166666676.54166666666667-4.44531251.90364583333333
4080.8359374999999987.29166666666667-6.455729166666677.1640625
4192.846354166666668.58333333333333-5.736979166666676.15364583333334
42149.356770833333339.75-0.3932291666666674.64322916666667
431210.106770833333311.8333333333333-1.72656251.89322916666667
441214.127604166666713.54166666666670.585937500000001-2.12760416666667
45711.554687514.0416666666667-2.48697916666667-4.5546875
461516.669270833333314.70833333333331.9609375-1.66927083333333
471419.273437515.3753.8984375-5.2734375
481921.700520833333316.1255.57552083333333-2.70052083333333
493926.638020833333317.08333333333339.554687512.3619791666667
501217.919270833333318.25-0.330729166666666-5.91927083333333
511115.221354166666719.6666666666667-4.4453125-4.22135416666667
521714.627604166666721.0833333333333-6.455729166666672.37239583333334
531616.429687522.1666666666667-5.73697916666667-0.4296875
542522.398437522.7916666666667-0.3932291666666672.6015625
5524NANA-1.7265625NA
5628NANA0.585937500000001NA
5725NANA-2.48697916666667NA
5831NANA1.9609375NA
5924NANA3.8984375NA
6024NANA5.57552083333333NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/1byto1293656723.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/1byto1293656723.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/2byto1293656723.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/2byto1293656723.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/337s81293656723.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/337s81293656723.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/437s81293656723.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293656605ldqb1axrss3uysn/437s81293656723.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 0 ; par4 = 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])
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