Home » date » 2009 » Aug » 16 »

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 16 Aug 2009 11:03:32 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx.htm/, Retrieved Sun, 16 Aug 2009 19:04:13 +0200
 
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/Aug/16/t1250442248yhvzw8oeils49vx.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 «
105,46 104,66 103,52 103,71 103,78 103,67 103,66 102,76 102 101,5 101,5 99,22 98,97 98,9 99,78 104,4 106,21 105,46 108,33 111,72 111,88 112,86 113,09 116,9 114,62 118,86 124,71 122,53 127,89 136,16 134,12 130,26 135,35 131,43 129,61 123,96 121,1 125,38 123,1 129,92 136,68 131,17 124,82 122,47 126,15 118,74 116,8 116,64 116,53 117,68 119,46 126,19 124,39 121,9 122,53 122,93 124,66 124,41 120,93 120,18 123,44 126,1 125,82 122,18 117,27 117,86 119,09 123,08 125,42 121,81 121,66 121,27 120,92 122,16 124,17 127,26 134,16 134,09 135,57 136,13 136,23 140,6 136,5 130,59 129,5 135,25 138,06 146,28 145,04 147,96 156,71 160,97 168,17 163,91 153,05 151,76
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1105.46NANA-4.37579365079365NA
2104.66NANA-2.28805555555556NA
3103.52NANA-1.48984126984127NA
4103.71NANA1.12480158730159NA
5103.78NANA2.28646825396825NA
6103.67NANA2.08974206349207NA
7103.66104.358015873016102.6829166666671.67509920634921-0.698015873015862
8102.76103.698134920635102.17251.52563492063493-0.938134920634909
9102104.677480158730101.7766666666672.90081349206349-2.67748015873015
10101.5102.614265873016101.6495833333330.964682539682542-1.11426587301585
11101.5100.636706349206101.779583333333-1.142876984126990.863293650793665
1299.2298.684742063492101.955416666667-3.27067460317460.535257936507946
1398.9797.8487896825397102.224583333333-4.375793650793651.12121031746034
1498.9100.504444444444102.7925-2.28805555555556-1.60444444444441
1599.78102.087658730159103.5775-1.48984126984127-2.30765873015871
16104.4105.587301587302104.46251.12480158730159-1.18730158730158
17106.21107.705218253968105.418752.28646825396825-1.49521825396828
18105.46108.728075396825106.6383333333332.08974206349207-3.26807539682541
19108.33109.702182539683108.0270833333331.67509920634921-1.37218253968253
20111.72111.036468253968109.5108333333331.525634920634930.683531746031747
21111.88114.282063492063111.381252.90081349206349-2.40206349206348
22112.86114.140099206349113.1754166666670.964682539682542-1.28009920634919
23113.09113.691289682540114.834166666667-1.14287698412699-0.601289682539687
24116.9113.745992063492117.016666666667-3.27067460317463.15400793650794
25114.62114.994623015873119.370416666667-4.37579365079365-0.374623015872999
26118.86118.929444444444121.2175-2.28805555555556-0.0694444444444429
27124.71121.478075396825122.967916666667-1.489841269841273.23192460317460
28122.53125.844384920635124.7195833333331.12480158730159-3.31438492063492
29127.89128.468134920635126.1816666666672.28646825396825-0.578134920634923
30136.16129.253908730159127.1641666666672.089742063492076.90609126984128
31134.12129.403432539683127.7283333333331.675099206349214.71656746031745
32130.26129.795634920635128.271.525634920634930.464365079365081
33135.35131.375396825397128.4745833333332.900813492063493.97460317460317
34131.43129.680099206349128.7154166666670.9646825396825421.74990079365082
35129.61128.246706349206129.389583333333-1.142876984126991.36329365079368
36123.96126.277242063492129.547916666667-3.2706746031746-2.31724206349206
37121.1124.576706349206128.9525-4.37579365079365-3.47670634920634
38125.38125.952361111111128.240416666667-2.28805555555556-0.572361111111121
39123.1126.042658730159127.5325-1.48984126984127-2.94265873015873
40129.92127.745218253968126.6204166666671.124801587301592.17478174603173
41136.68127.844384920635125.5579166666672.286468253968258.83561507936508
42131.17126.808908730159124.7191666666672.089742063492074.36109126984127
43124.82125.898849206349124.223751.67509920634921-1.07884920634922
44122.47125.238134920635123.71251.52563492063493-2.76813492063491
45126.15126.140813492064123.242.900813492063490.009186507936505
46118.74123.897599206349122.9329166666670.964682539682542-5.1575992063492
47116.8121.122539682540122.265416666667-1.14287698412699-4.32253968253967
48116.64118.096408730159121.367083333333-3.2706746031746-1.45640873015874
49116.53116.509623015873120.885416666667-4.375793650793650.0203769841269974
50117.68118.521111111111120.809166666667-2.28805555555556-0.841111111111104
51119.46119.276408730159120.76625-1.489841269841270.183591269841273
52126.19122.065218253968120.9404166666671.124801587301594.12478174603174
53124.39123.635218253968121.348752.286468253968250.754781746031767
54121.9123.758075396825121.6683333333332.08974206349207-1.8580753968254
55122.53123.778849206349122.103751.67509920634921-1.24884920634921
56122.93124.268134920635122.74251.52563492063493-1.33813492063491
57124.66126.259146825397123.3583333333332.90081349206349-1.59914682539682
58124.41124.420932539683123.456250.964682539682542-0.0109325396825568
59120.93121.849623015873122.9925-1.14287698412699-0.919623015873015
60120.18119.256825396825122.5275-3.27067460317460.923174603174616
61123.44117.840039682540122.215833333333-4.375793650793655.59996031746032
62126.1119.790694444444122.07875-2.288055555555566.30930555555555
63125.82120.626825396825122.116666666667-1.489841269841275.19317460317461
64122.18123.164801587302122.041.12480158730159-0.984801587301575
65117.27124.248551587302121.9620833333332.28646825396825-6.9785515873016
66117.86124.127658730159122.0379166666672.08974206349207-6.2676587301587
67119.09123.653432539683121.9783333333331.67509920634921-4.56343253968252
68123.08123.234801587302121.7091666666671.52563492063493-0.154801587301577
69125.42124.377063492063121.476252.900813492063491.04293650793655
70121.81122.583849206349121.6191666666670.964682539682542-0.773849206349198
71121.66121.391706349206122.534583333333-1.142876984126990.268293650793638
72121.27120.643908730159123.914583333333-3.27067460317460.626091269841268
73120.92120.901706349206125.2775-4.375793650793650.0182936507936518
74122.16124.219861111111126.507916666667-2.28805555555556-2.05986111111110
75124.17126.012242063492127.502083333333-1.48984126984127-1.84224206349208
76127.26129.860218253968128.7354166666671.12480158730159-2.60021825396827
77134.16132.423134920635130.1366666666672.286468253968251.73686507936509
78134.09133.233075396825131.1433333333332.089742063492070.856924603174633
79135.57133.564265873016131.8891666666671.675099206349212.00573412698412
80136.13134.317718253968132.7920833333331.525634920634931.81228174603174
81136.23136.817063492063133.916252.90081349206349-0.587063492063493
82140.6136.252182539683135.28750.9646825396825424.34781746031746
83136.5135.390456349206136.533333333333-1.142876984126991.10954365079365
84130.59134.293908730159137.564583333333-3.2706746031746-3.7039087301587
85129.5134.647539682540139.023333333333-4.37579365079365-5.1475396825397
86135.25138.651111111111140.939166666667-2.28805555555556-3.40111111111111
87138.06141.815158730159143.305-1.48984126984127-3.75515873015874
88146.28146.731884920635145.6070833333331.12480158730159-0.451884920634882
89145.04149.554384920635147.2679166666672.28646825396825-4.51438492063491
90147.96150.929325396825148.8395833333332.08974206349207-2.96932539682535
91156.71NANA1.67509920634921NA
92160.97NANA1.52563492063493NA
93168.17NANA2.90081349206349NA
94163.91NANA0.964682539682542NA
95153.05NANA-1.14287698412699NA
96151.76NANA-3.2706746031746NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/160th1250442209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/160th1250442209.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/2xv7x1250442209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/2xv7x1250442209.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/3jsn71250442209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/3jsn71250442209.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/45i471250442209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442248yhvzw8oeils49vx/45i471250442209.ps (open in new window)


 
Parameters (Session):
par2 = grey ; par3 = FALSE ; par4 = Unknown ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ; par3 = FALSE ; par4 = Unknown ;
 
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