Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 05:32:49 -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/04/t1259930028eyqbb0gnasojv71.htm/, Retrieved Fri, 04 Dec 2009 13:33:57 +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/04/t1259930028eyqbb0gnasojv71.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 «
24 22 25 24 29 26 26 21 23 22 21 16 19 16 25 27 23 22 23 20 24 23 20 21 22 17 21 19 23 22 15 23 21 18 18 18 18 10 13 10 9 9 6 11 9 10 9 16 10 7 7 14 11 10 6 8 13 12 15 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
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
124NANA0.46875NA
222NANA-3.9375NA
325NANA0.302083333333333NA
424NANA1.51041666666667NA
529NANA0.677083333333334NA
626NANA-0.0104166666666665NA
72619.812523.0416666666667-3.229166666666676.1875
82124.0312522.58333333333331.44791666666667-3.03125
92322.927083333333322.33333333333330.593750.0729166666666643
102223.187522.45833333333330.729166666666666-1.1875
112122.041666666666722.3333333333333-0.291666666666667-1.04166666666666
121623.6562521.91666666666671.73958333333333-7.65625
131922.0937521.6250.46875-3.09375
141617.520833333333321.4583333333333-3.9375-1.52083333333334
152521.760416666666721.45833333333330.3020833333333333.23958333333334
162723.052083333333321.54166666666671.510416666666673.94791666666666
172322.2187521.54166666666670.6770833333333340.781250000000004
182221.697916666666721.7083333333333-0.01041666666666650.302083333333339
192318.812522.0416666666667-3.229166666666674.1875
202023.6562522.20833333333331.44791666666667-3.65625
212422.677083333333322.08333333333330.593751.32291666666667
222322.312521.58333333333330.7291666666666660.687500000000004
232020.958333333333321.25-0.291666666666667-0.958333333333329
242122.989583333333321.251.73958333333333-1.98958333333334
252221.385416666666720.91666666666670.468750.614583333333332
261716.770833333333320.7083333333333-3.93750.229166666666671
272121.010416666666720.70833333333330.302083333333333-0.0104166666666679
281921.885416666666720.3751.51041666666667-2.88541666666667
292320.760416666666720.08333333333330.6770833333333342.23958333333333
302219.864583333333319.875-0.01041666666666652.13541666666667
311516.354166666666719.5833333333333-3.22916666666667-1.35416666666667
322320.572916666666719.1251.447916666666672.42708333333334
332119.0937518.50.593751.90625
341818.520833333333317.79166666666670.729166666666666-0.520833333333332
351816.541666666666716.8333333333333-0.2916666666666671.45833333333334
361817.447916666666715.70833333333331.739583333333330.552083333333336
371815.260416666666714.79166666666670.468752.73958333333333
38109.9791666666666713.9166666666667-3.93750.0208333333333339
391313.2187512.91666666666670.302083333333333-0.21875
401013.5937512.08333333333331.51041666666667-3.59375
41912.052083333333311.3750.677083333333334-3.05208333333333
42910.9062510.9166666666667-0.0104166666666665-1.90625
4367.2708333333333310.5-3.22916666666667-1.27083333333333
441111.489583333333310.04166666666671.44791666666667-0.489583333333334
45910.26041666666679.666666666666670.59375-1.26041666666667
461010.31259.583333333333330.729166666666666-0.312499999999998
4799.541666666666679.83333333333333-0.291666666666667-0.541666666666666
481611.69791666666679.958333333333331.739583333333334.30208333333334
491010.46875100.46875-0.468749999999998
5075.93759.875-3.93751.0625
51710.218759.916666666666670.302083333333333-3.21875
521411.677083333333310.16666666666671.510416666666672.32291666666667
531111.177083333333310.50.677083333333334-0.177083333333334
541010.739583333333310.75-0.0104166666666665-0.739583333333336
5567.7708333333333311-3.22916666666667-1.77083333333333
568NANA1.44791666666667NA
5713NANA0.59375NA
5812NANA0.729166666666666NA
5915NANA-0.291666666666667NA
6016NANA1.73958333333333NA
6116NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/1f8ge1259929965.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/1f8ge1259929965.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/2z4p51259929965.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/2z4p51259929965.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/32g5q1259929965.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/32g5q1259929965.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/4qiir1259929965.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259930028eyqbb0gnasojv71/4qiir1259929965.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