Home » date » 2009 » Dec » 01 »

*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: Tue, 01 Dec 2009 12:00:39 -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/01/t12596940825vd9xi4gh3vli3k.htm/, Retrieved Tue, 01 Dec 2009 20:01:27 +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/01/t12596940825vd9xi4gh3vli3k.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 «
8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
18.9NANA0.152083333333333NA
28.8NANA0.153125NA
38.3NANA0.0364583333333331NA
47.5NANA-0.101041666666667NA
57.2NANA-0.290625NA
67.4NANA-0.409375NA
78.88.517708333333338.3750.1427083333333330.282291666666667
89.38.602083333333338.350.2520833333333330.697916666666668
99.38.560416666666678.350.2104166666666670.739583333333334
108.78.48.38750.01250000000000010.300000000000001
118.28.314583333333338.45416666666667-0.139583333333334-0.114583333333334
128.38.493758.5125-0.0187499999999997-0.193750000000000
138.58.677083333333338.5250.152083333333333-0.177083333333334
148.68.644791666666668.491666666666670.153125-0.044791666666665
158.58.4781258.441666666666660.03645833333333310.0218750000000014
168.28.307291666666678.40833333333333-0.101041666666667-0.107291666666667
178.18.117708333333338.40833333333333-0.290625-0.0177083333333332
187.98.0156258.425-0.409375-0.115624999999998
198.68.5843758.441666666666660.1427083333333330.0156250000000018
208.78.706258.454166666666670.252083333333333-0.00624999999999964
218.78.672916666666668.46250.2104166666666670.0270833333333353
228.58.491666666666678.479166666666670.01250000000000010.00833333333333464
238.48.360416666666678.5-0.1395833333333340.0395833333333346
248.58.493758.5125-0.01874999999999970.00624999999999964
258.78.652083333333338.50.1520833333333330.0479166666666675
268.78.611458333333338.458333333333330.1531250.0885416666666679
278.68.444791666666678.408333333333330.03645833333333310.155208333333333
288.58.261458333333338.3625-0.1010416666666670.23854166666667
298.38.030208333333338.32083333333333-0.2906250.26979166666667
3087.8656258.275-0.4093750.134375000000002
318.28.363541666666678.220833333333330.142708333333333-0.163541666666667
328.18.414583333333338.16250.252083333333333-0.314583333333333
338.18.314583333333338.104166666666670.210416666666667-0.214583333333334
3488.066666666666668.054166666666670.0125000000000001-0.0666666666666655
357.97.868758.00833333333333-0.1395833333333340.03125
367.97.931257.95-0.0187499999999997-0.0312499999999991
3788.039583333333337.88750.152083333333333-0.0395833333333329
3887.9781257.8250.1531250.0218749999999996
397.97.782291666666677.745833333333330.03645833333333310.117708333333333
4087.557291666666677.65833333333333-0.1010416666666670.442708333333334
417.77.288541666666677.57916666666667-0.2906250.411458333333334
427.27.1031257.5125-0.4093750.096874999999999
437.57.5968757.454166666666670.142708333333333-0.096874999999999
447.37.639583333333337.38750.252083333333333-0.339583333333332
4577.514583333333337.304166666666670.210416666666667-0.514583333333333
4677.204166666666677.191666666666670.0125000000000001-0.204166666666666
4776.918757.05833333333333-0.1395833333333340.0812500000000025
487.26.943756.9625-0.01874999999999970.256250000000001
497.37.093756.941666666666670.1520833333333330.206250000000001
507.17.1281256.9750.153125-0.0281249999999984
516.87.057291666666677.020833333333330.0364583333333331-0.257291666666665
526.46.936458333333337.0375-0.101041666666667-0.536458333333333
536.16.726041666666677.01666666666667-0.290625-0.626041666666667
546.56.5781256.9875-0.409375-0.0781249999999991
557.7NANA0.142708333333333NA
567.9NANA0.252083333333333NA
577.5NANA0.210416666666667NA
586.9NANA0.0125000000000001NA
596.6NANA-0.139583333333334NA
606.9NANA-0.0187499999999997NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/1oxuv1259694031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/1oxuv1259694031.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/2lyw01259694031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/2lyw01259694031.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/3035a1259694031.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596940825vd9xi4gh3vli3k/3035a1259694031.ps (open in new window)


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