Home » date » 2011 » May » 12 »

Opgave 9; oefening 2: Weuts Koen

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 12 May 2011 13:18:29 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz.htm/, Retrieved Thu, 12 May 2011 15:15:09 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
190,2 180,7 193,6 192,8 195,5 197,2 196,9 178,9 172,4 156,4 143,7 153,6 168,8 185,8 199,9 205,4 197,5 199,6 200,5 193,7 179,6 169,1 169,8 195,5 194,8 204,5 203,8 204,8 204,9 240 248,3 258,4 254,9 288,3 333,6 346,3 357,5 490,7 468,2 471,2 517,1 609,2 682 614 554,2 406,8 348,6 298,8 313,7 282,1 232,9 239,3 241,9 265,7 276 271,5 254,6 269,9 293,5 306,1 365,4 347,9 352,1 377,9 377,4 372,2 362,5 341,9 354,8 369,2 406,7 454,7
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1190.2NANA-12.8691666666667NA
2180.7NANA6.55249999999999NA
3193.6NANA-7.14583333333334NA
4192.8NANA-2.09916666666666NA
5195.5NANA1.97583333333333NA
6197.2NANA26.855NA
7196.9223.565833333333178.43333333333345.1325-26.6658333333333
8178.9202.593333333333177.75416666666724.8391666666667-23.6933333333333
9172.4180.194166666667178.2291666666671.96500000000002-7.79416666666663
10156.4153.078333333333179.016666666667-25.93833333333343.32166666666672
11143.7150.368333333333179.625-29.2566666666667-6.66833333333335
12153.6149.7975179.808333333333-30.01083333333333.80250000000001
13168.8167.189166666667180.058333333333-12.86916666666671.61083333333337
14185.8187.3775180.8256.55249999999999-1.57749999999996
15199.9174.595833333333181.741666666667-7.1458333333333425.3041666666667
16205.4180.471666666667182.570833333333-2.0991666666666624.9283333333333
17197.5186.163333333333184.18751.9758333333333311.3366666666667
18199.6213.875833333333187.02083333333326.855-14.2758333333334
19200.5234.9825189.8545.1325-34.4825
20193.7216.551666666667191.712524.8391666666667-22.8516666666667
21179.6194.619166666667192.6541666666671.96500000000002-15.0191666666667
22169.1166.853333333333192.791666666667-25.93833333333342.24666666666667
23169.8163.818333333333193.075-29.25666666666675.98166666666668
24195.5165.055833333333195.066666666667-30.010833333333330.4441666666666
25194.8185.8725198.741666666667-12.86916666666678.92750000000007
26204.5209.981666666667203.4291666666676.55249999999999-5.48166666666665
27203.8202.116666666667209.2625-7.145833333333341.68333333333337
28204.8215.2675217.366666666667-2.09916666666666-10.4675
29204.9231.134166666667229.1583333333331.97583333333333-26.2341666666666
30240269.121666666667242.26666666666726.855-29.1216666666666
31248.3300.461666666667255.32916666666745.1325-52.1616666666667
32258.4298.8725274.03333333333324.8391666666667-40.4725
33254.9298.94296.9751.96500000000002-44.04
34288.3293.153333333333319.091666666667-25.9383333333334-4.8533333333333
35333.6313.943333333333343.2-29.256666666666719.6566666666667
36346.3341.580833333333371.591666666667-30.01083333333334.71916666666669
37357.5392.176666666667405.045833333333-12.8691666666667-34.6766666666667
38490.7444.485833333333437.9333333333336.5524999999999946.2141666666666
39468.2458.075465.220833333333-7.1458333333333410.125
40471.2480.53482.629166666667-2.09916666666666-9.33000000000004
41517.1490.1675488.1916666666671.9758333333333326.9325000000001
42609.2513.6925486.837526.85595.5075000000001
43682528.165833333333483.03333333333345.1325153.834166666667
44614497.355833333333472.51666666666724.8391666666667116.644166666667
45554.2455.985833333333454.0208333333331.9650000000000298.2141666666668
46406.8408.615833333333434.554166666667-25.9383333333334-1.81583333333327
47348.6384.168333333333413.425-29.2566666666667-35.5683333333333
48298.8357.635387.645833333333-30.0108333333333-58.835
49313.7343.5475356.416666666667-12.8691666666667-29.8475000000001
50282.1331.781666666667325.2291666666676.55249999999999-49.6816666666667
51232.9291.329166666667298.475-7.14583333333334-58.4291666666667
52239.3278.188333333333280.2875-2.09916666666666-38.8883333333333
53241.9274.263333333333272.28751.97583333333333-32.3633333333333
54265.7297.150833333333270.29583333333326.855-31.4508333333333
55276317.886666666667272.75416666666745.1325-41.8866666666667
56271.5302.489166666667277.6524.8391666666667-30.9891666666666
57254.6287.323333333333285.3583333333331.96500000000002-32.7233333333333
58269.9270.161666666667296.1-25.9383333333334-0.261666666666713
59293.5278.264166666667307.520833333333-29.256666666666715.2358333333333
60306.1287.593333333333317.604166666667-30.010833333333318.5066666666667
61365.4312.776666666667325.645833333333-12.869166666666752.6233333333334
62347.9338.735833333333332.1833333333336.552499999999999.16416666666669
63352.1332.145833333333339.291666666667-7.1458333333333419.9541666666667
64377.9345.505347.604166666667-2.0991666666666632.395
65377.4358.434166666667356.4583333333331.9758333333333318.9658333333333
66372.2394.221666666667367.36666666666726.855-22.0216666666667
67362.5NANA45.1325NA
68341.9NANA24.8391666666667NA
69354.8NANA1.96500000000002NA
70369.2NANA-25.9383333333334NA
71406.7NANA-29.2566666666667NA
72454.7NANA-30.0108333333333NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/1tu151305206307.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/1tu151305206307.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/2e48p1305206307.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/2e48p1305206307.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/3qiae1305206307.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/3qiae1305206307.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/47py91305206307.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305206105xu4wxp08csvl9tz/47py91305206307.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