Home » date » 2009 » Jan » 16 »

2MAR03A_Robbe Leys_opgave9_deel2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 15 Jan 2009 16:07:17 -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/Jan/16/t1232061006dpom8u2pf205ao2.htm/, Retrieved Fri, 16 Jan 2009 00:10:10 +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/Jan/16/t1232061006dpom8u2pf205ao2.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 «
284.4 212.8 226.9 308.4 262 227.9 236.1 320.4 271.9 232.8 237 313.4 261.4 226.8 249.9 314.3 286.1 226.5 260.4 311.4 294.7 232.6 257.2 339.2 279.1 249.8 269.8 345.7 293.8 254.7 277.5 363.4 313.4 272.8 300.1 369.5 330.8 287.8 305.9 386.1 335.2 288 308.3 402.3 352.8 316.1 324.9 404.8 393 318.9 327 442.3 383.1 331.6 361.4 445.9 386.6 357.2 373.6 466.2 409.6 369.8 378.6 487 419.2 376.7 392.8 506.1 458.4 387.4 426.9 565 464.8 444.5 449.5 556.1 499.6 451.9 434.9 553.8 510 432.9 453.2 547.6 485.8 452.6 456.6 565.7 514.8 464.3 430.9 588.3 503.1 442.6 448 554.5 504.5 427.3 473.1 526.2 547.5 440.2 468.7 574.5 492.6 432.6 479.8 575.7 474.6 405.3 434.6 535.1 452.6 429.5 417.2 551.8 464 416.6 422.9 553.6 458.6 427.6 429.2 534.2 481.7 416 440.2 538.7 473.8 439.9 446.8 597.5 467.2 439.4 447.4 568.5 485.9 442.1 430.5 600 464.5 423.6 437 574 443 410 420 532 432 420 411 512
 
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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1284.4NANA4.66951013513514NA
2212.8NANA-43.5429898648649NA
3226.9224.220523648649255.325-31.10447635135142.67947635135135
4308.4324.390456081081254.412569.9779560810811-15.9904560810810
5262262.119510135135257.454.66951013513514-0.119510135135101
6227.9216.557010135135260.1-43.542989864864911.3429898648649
7236.1231.733023648649262.8375-31.10447635135144.36697635135135
8320.4334.665456081081264.687569.9779560810811-14.2654560810811
9271.9270.082010135135265.41254.669510135135141.81798986486484
10232.8221.107010135135264.65-43.542989864864911.6929898648649
11237231.358023648649262.4625-31.10447635135145.64197635135139
12313.4330.377956081081260.469.9779560810811-16.9779560810811
13261.4265.932010135135261.26254.66951013513514-4.53201013513512
14226.8219.444510135135262.9875-43.54298986486497.35548986486486
15249.9235.083023648649266.1875-31.104476351351414.8169763513513
16314.3339.215456081081269.237569.9779560810811-24.9154560810811
17286.1275.182010135135270.51254.6695101351351410.9179898648649
18226.5227.919510135135271.4625-43.5429898648649-1.41951013513511
19260.4241.070523648649272.175-31.104476351351419.3294763513513
20311.4343.990456081081274.012569.9779560810811-32.5904560810811
21294.7279.044510135135274.3754.6695101351351415.6554898648649
22232.6233.907010135135277.45-43.5429898648649-1.30701013513516
23257.2247.870523648649278.975-31.10447635135149.32947635135133
24339.2349.152956081081279.17569.9779560810811-9.95295608108108
25279.1287.569510135135282.94.66951013513514-8.46951013513507
26249.8241.744510135135285.2875-43.54298986486498.05548986486485
27269.8256.833023648649287.9375-31.104476351351412.9669763513514
28345.7360.365456081081290.387569.9779560810811-14.6654560810811
29293.8296.632010135135291.96254.66951013513514-2.83201013513514
30254.7251.594510135135295.1375-43.54298986486493.10548986486486
31277.5268.695523648649299.8-31.10447635135148.80447635135135
32363.4374.490456081081304.512569.9779560810811-11.0904560810810
33313.4314.269510135135309.64.66951013513514-0.869510135135158
34272.8269.644510135135313.1875-43.54298986486493.15548986486482
35300.1285.020523648649316.125-31.104476351351415.0794763513514
36369.5390.152956081081320.17569.9779560810811-20.6529560810811
37330.8327.444510135135322.7754.669510135135143.35548986486492
38287.8282.032010135135325.575-43.54298986486495.76798986486489
39305.9297.095523648649328.2-31.10447635135148.8044763513513
40386.1398.752956081081328.77569.9779560810811-12.652956081081
41335.2333.769510135135329.14.669510135135141.43048986486491
42288287.882010135135331.425-43.54298986486490.117989864864853
43308.3304.545523648649335.65-31.10447635135143.7544763513514
44402.3411.340456081081341.362569.9779560810811-9.04045608108106
45352.8351.619510135135346.954.669510135135141.18048986486485
46316.1305.794510135135349.3375-43.542989864864910.3054898648649
47324.9323.570523648649354.675-31.10447635135141.32947635135133
48404.8430.027956081081360.0569.9779560810811-25.2279560810811
49393365.332010135135360.66254.6695101351351427.6679898648649
50318.9322.069510135135365.6125-43.5429898648649-3.16951013513517
51327337.958023648649369.0625-31.1044763513514-10.9580236486486
52442.3439.390456081081369.412569.97795608108112.90954391891893
53383.1379.969510135135375.34.669510135135143.1304898648649
54331.6336.507010135135380.05-43.5429898648649-4.90701013513512
55361.4349.833023648649380.9375-31.104476351351411.5669763513513
56445.9454.552956081081384.57569.9779560810811-8.65295608108107
57386.6393.969510135135389.34.66951013513514-7.3695101351351
58357.2349.819510135135393.3625-43.54298986486497.38048986486484
59373.6367.670523648649398.775-31.10447635135145.92947635135141
60466.2473.202956081081403.22569.9779560810811-7.0029560810811
61409.6410.094510135135405.4254.66951013513514-0.494510135135101
62369.8365.107010135135408.65-43.54298986486494.6929898648649
63378.6381.345523648649412.45-31.1044763513514-2.7455236486486
64487484.490456081081414.512569.97795608108112.50954391891889
65419.2421.819510135135417.154.66951013513514-2.6195101351351
66376.7377.769510135135421.3125-43.5429898648649-1.06951013513515
67392.8397.495523648649428.6-31.1044763513514-4.69552364864859
68506.1504.815456081081434.837569.97795608108111.28454391891904
69458.4445.107010135135440.43754.6695101351351413.2929898648649
70387.4408.519510135135452.0625-43.5429898648649-21.1195101351351
71426.9429.120523648649460.225-31.1044763513514-2.22052364864862
72565538.140456081081468.162569.977956081081126.8595439189190
73464.8482.794510135135478.1254.66951013513514-17.9945101351351
74444.5436.294510135135479.8375-43.54298986486498.20548986486489
75449.5451.970523648649483.075-31.1044763513514-2.47052364864868
76556.1558.327956081081488.3569.9779560810811-2.22795608108106
77499.6492.119510135135487.454.669510135135147.48048986486498
78451.9441.794510135135485.3375-43.542989864864910.1054898648649
79434.9455.245523648649486.35-31.1044763513514-20.3455236486486
80553.8555.252956081081485.27569.9779560810811-1.45295608108114
81510489.857010135135485.18754.6695101351351420.1429898648649
82432.9443.157010135135486.7-43.5429898648649-10.2570101351352
83453.2451.795523648649482.9-31.10447635135141.40447635135138
84547.6552.315456081081482.337569.9779560810811-4.71545608108107
85485.8489.894510135135485.2254.66951013513514-4.09451013513512
86452.6444.369510135135487.9125-43.54298986486498.23048986486486
87456.6462.695523648649493.8-31.1044763513514-6.09552364864868
88565.7568.865456081081498.887569.9779560810811-3.16545608108100
89514.8501.807010135135497.13754.6695101351351412.9929898648649
90464.3453.207010135135496.75-43.542989864864911.0929898648649
91430.9467.008023648649498.1125-31.1044763513514-36.1080236486486
92588.3563.915456081081493.937569.977956081081124.3845439189189
93503.1498.032010135135493.36254.669510135135145.0679898648649
94442.6447.732010135135491.275-43.5429898648649-5.13201013513509
95448456.120523648649487.225-31.1044763513514-8.1205236486486
96554.5555.465456081081485.487569.9779560810811-0.965456081081072
97504.5491.382010135135486.71254.6695101351351413.1179898648649
98427.3442.769510135135486.3125-43.5429898648649-15.4695101351351
99473.1457.045523648649488.15-31.104476351351416.0544763513514
100526.2565.115456081081495.137569.9779560810811-38.9154560810811
101547.5500.869510135135496.24.6695101351351446.6304898648648
102440.2458.144510135135501.6875-43.5429898648649-17.9445101351351
103468.7469.758023648649500.8625-31.1044763513514-1.05802364864866
104574.5563.027956081081493.0569.977956081081111.4720439189189
105492.6498.157010135135493.48754.66951013513514-5.55701013513504
106432.6451.482010135135495.025-43.5429898648649-18.8820101351351
107479.8461.820523648649492.925-31.104476351351417.9794763513514
108575.7557.240456081081487.262569.977956081081118.459543918919
109474.6482.869510135135478.24.66951013513514-8.26951013513514
110405.3423.932010135135467.475-43.5429898648649-18.6320101351351
111434.6428.545523648649459.65-31.10447635135146.05447635135141
112535.1529.902956081081459.92569.97795608108115.19704391891889
113452.6465.444510135135460.7754.66951013513514-12.8445101351351
114429.5417.144510135135460.6875-43.542989864864912.3554898648649
115417.2433.095523648649464.2-31.1044763513514-15.8955236486486
116551.8533.990456081081464.012569.977956081081117.8095439189189
117464467.782010135135463.11254.66951013513514-3.78201013513507
118416.6420.507010135135464.05-43.5429898648649-3.90701013513518
119422.9432.495523648649463.6-31.1044763513514-9.59552364864868
120553.6534.277956081081464.369.977956081081119.3220439189190
121458.6471.132010135135466.46254.66951013513514-12.5320101351351
122427.6421.282010135135464.825-43.54298986486496.3179898648649
123429.2434.183023648649465.2875-31.1044763513514-4.98302364864861
124534.2536.702956081081466.72569.9779560810811-2.50295608108104
125481.7471.319510135135466.654.6695101351351410.3804898648649
126416425.044510135135468.5875-43.5429898648649-9.04451013513511
127440.2437.058023648649468.1625-31.10447635135143.14197635135139
128538.7540.140456081081470.162569.9779560810811-1.44045608108104
129473.8478.644510135135473.9754.66951013513514-4.84451013513507
130439.9438.607010135135482.15-43.54298986486491.29298986486486
131446.8457.570523648649488.675-31.1044763513514-10.7705236486487
132597.5557.765456081081487.787569.977956081081139.7345439189189
133467.2492.469510135135487.84.66951013513514-25.2695101351351
134439.4440.707010135135484.25-43.5429898648649-1.30701013513516
135447.4451.858023648649482.9625-31.1044763513514-4.45802364864863
136568.5555.615456081081485.637569.977956081081112.8845439189190
137485.9488.532010135135483.86254.66951013513514-2.63201013513515
138442.1442.144510135135485.6875-43.5429898648649-0.0445101351351127
139430.5455.845523648649486.95-31.1044763513514-25.3455236486486
140600551.940456081081481.962569.977956081081148.059543918919
141464.5485.132010135135480.46254.66951013513514-20.6320101351351
142423.6434.482010135135478.025-43.5429898648649-10.8820101351351
143437440.983023648649472.0875-31.1044763513514-3.98302364864861
144574537.677956081081467.769.977956081081136.3220439189190
145443468.544510135135463.8754.66951013513514-25.5445101351351
146410412.957010135135456.5-43.5429898648649-2.95701013513514
147420418.770523648649449.875-31.10447635135141.22947635135137
148532519.727956081081449.7569.977956081081112.2720439189189
149432454.544510135135449.8754.66951013513514-22.5445101351351
150420402.707010135135446.25-43.542989864864917.2929898648649
151411NANA-31.1044763513514NA
152512NANA69.9779560810811NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/1g4kx1232060834.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/1g4kx1232060834.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/2ttmh1232060834.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/2ttmh1232060834.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/3s94i1232060834.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/3s94i1232060834.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/4dehx1232060834.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/16/t1232061006dpom8u2pf205ao2/4dehx1232060834.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 4 ;
 
Parameters (R input):
par1 = additive ; par2 = 4 ;
 
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