Home » date » 2008 » May » 18 » attachments

Mathieu Demoor - Opgave 9.2

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 18 May 2008 15:48:26 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q.htm/, Retrieved Sun, 18 May 2008 23:48:59 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
113 110 107 103 98 98 137 148 147 139 130 128 127 123 118 114 108 111 151 159 158 148 138 137 136 133 126 120 114 116 153 162 161 149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1113NANA-3.40885416666666NA
2110NANA-6.50260416666666NA
3107NANA-12.2942708333333NA
4103NANA-16.7630208333333NA
598NANA-21.6380208333333NA
698NANA-19.6901041666667NA
7137138.872395833333122.08333333333316.7890625-1.87239583333334
8148147.9765625123.20833333333324.76822916666670.0234375000000142
9147148.486979166667124.20833333333324.2786458333333-1.48697916666667
10139137.9140625125.12512.78906251.0859375
11130128.7994791666671262.799479166666671.20052083333334
12128125.830729166667126.958333333333-1.127604166666672.16927083333337
13127124.674479166667128.083333333333-3.408854166666662.32552083333334
14123122.622395833333129.125-6.502604166666660.377604166666686
15118117.747395833333130.041666666667-12.29427083333330.252604166666686
16114114.111979166667130.875-16.7630208333333-0.111979166666629
17108109.9453125131.583333333333-21.6380208333333-1.94531249999997
18111112.6015625132.291666666667-19.6901041666667-1.60156249999997
19151149.830729166667133.04166666666716.78906251.16927083333334
20159158.6015625133.83333333333324.76822916666670.3984375
21158158.861979166667134.58333333333324.2786458333333-0.861979166666657
22148147.955729166667135.16666666666712.78906250.0442708333333428
23138138.466145833333135.6666666666672.79947916666667-0.466145833333286
24137134.997395833333136.125-1.127604166666672.00260416666669
25136133.0078125136.416666666667-3.408854166666662.9921875
26133130.122395833333136.625-6.502604166666662.87760416666666
27126124.580729166667136.875-12.29427083333331.41927083333334
28120120.278645833333137.041666666667-16.7630208333333-0.278645833333314
29114115.486979166667137.125-21.6380208333333-1.48697916666666
30116117.393229166667137.083333333333-19.6901041666667-1.39322916666666
31153153.5390625136.7516.7890625-0.5390625
32162161.018229166667136.2524.76822916666670.981770833333371
33161160.111979166667135.83333333333324.27864583333330.888020833333343
34149148.330729166667135.54166666666712.78906250.669270833333314
35139138.1328125135.3333333333332.799479166666670.8671875
36135133.997395833333135.125-1.127604166666671.00260416666669
37130131.424479166667134.833333333333-3.40885416666666-1.42447916666666
38127127.955729166667134.458333333333-6.50260416666666-0.955729166666657
39122121.7890625134.083333333333-12.29427083333330.210937500000028
40117117.0703125133.833333333333-16.7630208333333-0.0703124999999716
41112112.028645833333133.666666666667-21.6380208333333-0.0286458333333144
42113113.768229166667133.458333333333-19.6901041666667-0.768229166666629
43149149.9140625133.12516.7890625-0.9140625
44157157.518229166667132.7524.7682291666667-0.518229166666657
45157156.653645833333132.37524.27864583333330.346354166666657
46147144.830729166667132.04166666666712.78906252.16927083333334
47137134.674479166667131.8752.799479166666672.32552083333334
48132130.6640625131.791666666667-1.127604166666671.33593750000003
49125128.1328125131.541666666667-3.40885416666666-3.1328125
50123124.5390625131.041666666667-6.50260416666666-1.5390625
51117118.122395833333130.416666666667-12.2942708333333-1.12239583333331
52114112.778645833333129.541666666667-16.76302083333331.22135416666666
53111106.778645833333128.416666666667-21.63802083333334.22135416666669
54112107.4765625127.166666666667-19.69010416666674.52343750000001
55144142.955729166667126.16666666666716.78906251.04427083333334
56150150.1015625125.33333333333324.7682291666667-0.101562499999986
57149148.611979166667124.33333333333324.27864583333330.388020833333329
58134136.122395833333123.33333333333312.7890625-2.12239583333333
59123124.966145833333122.1666666666672.79947916666667-1.96614583333333
60116119.580729166667120.708333333333-1.12760416666667-3.58072916666667
61117115.674479166667119.083333333333-3.408854166666661.32552083333331
62111110.9140625117.416666666667-6.502604166666660.0859374999999858
63105103.247395833333115.541666666667-12.29427083333331.75260416666666
6410296.9453125113.708333333333-16.76302083333335.05468750000001
659590.5703125112.208333333333-21.63802083333334.4296875
669391.3515625111.041666666667-19.69010416666671.64843750000001
67124NANA16.7890625NA
68130NANA24.7682291666667NA
69124NANA24.2786458333333NA
70115NANA12.7890625NA
71106NANA2.79947916666667NA
72105NANA-1.12760416666667NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/1glod1211147301.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/1glod1211147301.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/2ywo51211147301.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/2ywo51211147301.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/3tl421211147301.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/3tl421211147301.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/4lo0q1211147301.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/18/t1211147339kqjinjm9wg0fn9q/4lo0q1211147301.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