Home » date » 2008 » Jun » 01 »

opgave 9 - oefening 2 - Seghers Sanne 2MAR03

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 01 Jun 2008 07:49: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/2008/Jun/01/t12123283598w92t15n5qwneho.htm/, Retrieved Sun, 01 Jun 2008 13:52:44 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
Additief decompositiemodel van PPI
 
Dataseries X:
» Textbox « » Textfile « » CSV «
121.3 124.0 122.9 120.1 118.3 118.1 118.4 116.6 116.4 116.7 117.7 119.5 123.3 124.6 125.4 127.0 126.8 131.8 128.1 130.1 133.5 142.7 140.0 137.9 132.6 133.7 137.0 141.1 145.3 146.1 141.8 140.0 137.4 139.5 140.3 142.7 143.3 146.0 147.2 146.1 147.1 141.7 138.8 138.3 140.2 143.1 142.0 142.4 141.2 138.0 137.9 136.8 135.9 138.8 139.5 138.0 139.7 137.5 137.8 137.4 141.7 145.3 148.9 151.3 151.4 149.2 143.8 143.6 144.3 142.0 140.8 141.8
 
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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1121.3NANA-0.476128472222225NA
2124NANA-0.443836805555555NA
3122.9NANA0.390538194444446NA
4120.1NANA0.806163194444441NA
5118.3NANA1.40512152777779NA
6118.1NANA1.83428819444444NA
7118.4118.156163194444119.25-1.093836805555540.243836805555546
8116.6117.407204861111119.358333333333-1.95112847222223-0.807204861111146
9116.4118.175954861111119.4875-1.31154513888889-1.77595486111112
10116.7121.069704861111119.8791666666671.19053819444445-4.36970486111112
11117.7120.526996527778120.5208333333330.00616319444444387-2.82699652777777
12119.5121.089496527778121.445833333333-0.35633680555556-1.58949652777778
13123.3121.944704861111122.420833333333-0.4761284722222251.35529513888889
14124.6122.943663194444123.3875-0.4438368055555551.65633680555554
15125.4125.053038194444124.66250.3905381944444460.34696180555558
16127127.264496527778126.4583333333330.806163194444441-0.26449652777778
17126.8129.875954861111128.4708333333331.40512152777779-3.0759548611111
18131.8132.000954861111130.1666666666671.83428819444444-0.200954861111086
19128.1130.226996527778131.320833333333-1.09383680555554-2.12699652777775
20130.1130.136371527778132.0875-1.95112847222223-0.0363715277777601
21133.5131.638454861111132.95-1.311545138888891.86154513888891
22142.7135.211371527778134.0208333333331.190538194444457.48862847222222
23140135.385329861111135.3791666666670.006163194444443874.6146701388889
24137.9136.389496527778136.745833333333-0.356336805555561.51050347222224
25132.6137.436371527778137.9125-0.476128472222225-4.83637152777777
26133.7138.451996527778138.895833333333-0.443836805555555-4.75199652777778
27137139.861371527778139.4708333333330.390538194444446-2.86137152777778
28141.1140.306163194444139.50.8061631944444410.793836805555571
29145.3140.784288194444139.3791666666671.405121527777794.51571180555555
30146.1141.425954861111139.5916666666671.834288194444444.67404513888889
31141.8139.143663194444140.2375-1.093836805555542.65633680555555
32140139.244704861111141.195833333333-1.951128472222230.755295138888897
33137.4140.821788194444142.133333333333-1.31154513888889-3.42178819444442
34139.5143.957204861111142.7666666666671.19053819444445-4.45720486111111
35140.3143.056163194444143.050.00616319444444387-2.75616319444444
36142.7142.585329861111142.941666666667-0.356336805555560.114670138888897
37143.3142.157204861111142.633333333333-0.4761284722222251.14279513888891
38146141.993663194444142.4375-0.4438368055555554.00633680555555
39147.2142.873871527778142.4833333333330.3905381944444464.32612847222222
40146.1143.556163194444142.750.8061631944444412.54383680555554
41147.1144.375954861111142.9708333333331.405121527777792.72404513888887
42141.7144.863454861111143.0291666666671.83428819444444-3.16345486111112
43138.8141.835329861111142.929166666667-1.09383680555554-3.03532986111108
44138.3140.557204861111142.508333333333-1.95112847222223-2.25720486111112
45140.2140.475954861111141.7875-1.31154513888889-0.275954861111103
46143.1142.203038194444141.01251.190538194444450.89696180555552
47142140.164496527778140.1583333333330.006163194444443871.83550347222223
48142.4139.214496527778139.570833333333-0.356336805555563.18550347222225
49141.2139.003038194444139.479166666667-0.4761284722222252.19696180555556
50138139.051996527778139.495833333333-0.443836805555555-1.05199652777776
51137.9139.853038194444139.46250.390538194444446-1.95303819444445
52136.8140.014496527778139.2083333333330.806163194444441-3.21449652777778
53135.9140.205121527778138.81.40512152777779-4.30512152777777
54138.8140.250954861111138.4166666666671.83428819444444-1.45095486111111
55139.5137.135329861111138.229166666667-1.093836805555542.36467013888890
56138136.603038194444138.554166666667-1.951128472222231.39696180555555
57139.7138.005121527778139.316666666667-1.311545138888891.69487847222223
58137.5141.569704861111140.3791666666671.19053819444445-4.06970486111109
59137.8141.635329861111141.6291666666670.00616319444444387-3.83532986111109
60137.4142.351996527778142.708333333333-0.35633680555556-4.95199652777777
61141.7142.844704861111143.320833333333-0.476128472222225-1.14470486111111
62145.3143.289496527778143.733333333333-0.4438368055555552.01050347222221
63148.9144.548871527778144.1583333333330.3905381944444464.35112847222223
64151.3145.343663194444144.53750.8061631944444415.95633680555557
65151.4146.255121527778144.851.405121527777795.14487847222222
66149.2146.992621527778145.1583333333331.834288194444442.20737847222222
67143.8NANA-1.09383680555554NA
68143.6NANA-1.95112847222223NA
69144.3NANA-1.31154513888889NA
70142NANA1.19053819444445NA
71140.8NANA0.00616319444444387NA
72141.8NANA-0.35633680555556NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/1jfio1212328166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/1jfio1212328166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/2k49n1212328166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/2k49n1212328166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/3ss031212328166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/3ss031212328166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/4v5g31212328166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123283598w92t15n5qwneho/4v5g31212328166.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