Home » date » 2010 » Dec » 13 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 13 Dec 2010 20:12:53 +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/13/t1292271088kma8cz77s46aznt.htm/, Retrieved Mon, 13 Dec 2010 21:11:33 +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/13/t1292271088kma8cz77s46aznt.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
98,1 98,0 98,3 98,5 98,7 99,3 99,5 99,8 100,3 99,3 99,6 99,3 99,4 99,7 100,0 99,3 100,3 100,8 101,4 101,1 100,6 99,5 99,1 98,8 99,1 98,8 98,5 99,0 99,0 100,6 101,0 101,8 101,8 101,8 101,8 102,4 103,0 103,3 103,6 104,1 104,5 105,6 105,9 106,0 106,3 107,3 107,1 107,3 107,7 108,0 108,9 108,5 109,0 108,9 109,0 108,9 110,3 109,4 108,6 108,0 108,4 108,0 108,0 107,6 107,5 107,9 108,0 107,5 106,8 106,7 107,2 107,8 106,6 106,3 105,7 105,9 106,5 107,2 108,3
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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
198.1NANA-0.246180555555554NA
298NANA-0.341180555555552NA
398.3NANA-0.21951388888888NA
498.5NANA-0.435347222222216NA
598.7NANA-0.200347222222225NA
699.3NANA0.365486111111111NA
799.599.647152777777899.11250.534652777777777-0.147152777777762
899.899.657152777777899.23750.4196527777777800.142847222222244
9100.399.796319444444499.37916666666660.4171527777777700.503680555555576
1099.399.577986111111199.48333333333330.0946527777777796-0.277986111111119
1199.699.391319444444499.5833333333333-0.1920138888888960.20868055555556
1299.399.515486111111199.7125-0.197013888888895-0.215486111111105
1399.499.607986111111199.8541666666667-0.246180555555554-0.207986111111097
1499.799.646319444444499.9875-0.3411805555555520.0536805555555873
1510099.8346527777777100.054166666667-0.219513888888880.165347222222252
1699.399.6396527777778100.075-0.435347222222216-0.339652777777772
17100.399.8621527777778100.0625-0.2003472222222250.437847222222217
18100.8100.386319444444100.0208333333330.3654861111111110.413680555555558
19101.4100.52215277777899.98750.5346527777777770.877847222222243
20101.1100.35715277777899.93750.4196527777777800.742847222222224
21100.6100.25465277777899.83750.4171527777777700.345347222222230
2299.599.857152777777899.76250.0946527777777796-0.35715277777777
2399.199.503819444444499.6958333333333-0.192013888888896-0.403819444444423
2498.899.436319444444599.6333333333333-0.197013888888895-0.636319444444453
2599.199.362152777777899.6083333333333-0.246180555555554-0.262152777777786
2698.899.279652777777899.6208333333333-0.341180555555552-0.479652777777787
2798.599.480486111111199.7-0.21951388888888-0.98048611111112
289999.410486111111199.8458333333333-0.435347222222216-0.410486111111098
299999.8538194444444100.054166666667-0.200347222222225-0.85381944444444
30100.6100.682152777778100.3166666666670.365486111111111-0.0821527777777646
31101101.163819444444100.6291666666670.534652777777777-0.163819444444442
32101.8101.398819444444100.9791666666670.4196527777777800.401180555555555
33101.8101.796319444444101.3791666666670.4171527777777700.00368055555554747
34101.8101.898819444444101.8041666666670.0946527777777796-0.0988194444444588
35101.8102.053819444444102.245833333333-0.192013888888896-0.253819444444446
36102.4102.486319444444102.683333333333-0.197013888888895-0.0863194444444417
37103102.849652777778103.095833333333-0.2461805555555540.150347222222223
38103.3103.133819444444103.475-0.3411805555555520.166180555555556
39103.6103.617986111111103.8375-0.21951388888888-0.0179861111110995
40104.1103.818819444444104.254166666667-0.4353472222222160.281180555555579
41104.5104.503819444444104.704166666667-0.200347222222225-0.00381944444441729
42105.6105.494652777778105.1291666666670.3654861111111110.105347222222235
43105.9106.063819444444105.5291666666670.534652777777777-0.163819444444442
44106106.340486111111105.9208333333330.419652777777780-0.340486111111090
45106.3106.754652777778106.33750.417152777777770-0.454652777777753
46107.3106.836319444444106.7416666666670.09465277777777960.463680555555555
47107.1106.920486111111107.1125-0.1920138888888960.179513888888891
48107.3107.240486111111107.4375-0.1970138888888950.0595138888888869
49107.7107.457986111111107.704166666667-0.2461805555555540.242013888888906
50108107.612986111111107.954166666667-0.3411805555555520.387013888888902
51108.9108.022152777778108.241666666667-0.219513888888880.877847222222258
52108.5108.060486111111108.495833333333-0.4353472222222160.439513888888911
53109108.445486111111108.645833333333-0.2003472222222250.554513888888891
54108.9109.102986111111108.73750.365486111111111-0.202986111111102
55109109.330486111111108.7958333333330.534652777777777-0.330486111111114
56108.9109.244652777778108.8250.419652777777780-0.344652777777782
57110.3109.204652777778108.78750.4171527777777701.09534722222223
58109.4108.807152777778108.71250.09465277777777960.592847222222233
59108.6108.420486111111108.6125-0.1920138888888960.179513888888891
60108108.311319444444108.508333333333-0.197013888888895-0.311319444444436
61108.4108.178819444444108.425-0.2461805555555540.221180555555577
62108107.983819444444108.325-0.3411805555555520.0161805555555645
63108107.901319444444108.120833333333-0.219513888888880.0986805555555463
64107.6107.427152777778107.8625-0.4353472222222160.172847222222217
65107.5107.491319444444107.691666666667-0.2003472222222250.00868055555554292
66107.9107.990486111111107.6250.365486111111111-0.0904861111111046
67108108.076319444444107.5416666666670.534652777777777-0.0763194444444366
68107.5107.815486111111107.3958333333330.419652777777780-0.315486111111113
69106.8107.646319444444107.2291666666670.417152777777770-0.846319444444447
70106.7107.157152777778107.06250.0946527777777796-0.45715277777775
71107.2106.757986111111106.95-0.1920138888888960.442013888888894
72107.8106.682152777778106.879166666667-0.1970138888888951.11784722222224
73106.6NA106.8625NANA
74106.3NANANANA
75105.7NANANANA
76105.9NANANANA
77106.5NANANANA
78107.2NANANANA
79108.3NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/185401292271170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/185401292271170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/285401292271170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/285401292271170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/3jwm31292271170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/3jwm31292271170.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/4c5361292271170.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292271088kma8cz77s46aznt/4c5361292271170.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