Home » date » 2009 » Jun » 01 »

ben eysackers, opgave 9, oef 2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 01 Jun 2009 06:50:58 -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/Jun/01/t12438609077edjx47xt869pcz.htm/, Retrieved Mon, 01 Jun 2009 14:55:11 +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/Jun/01/t12438609077edjx47xt869pcz.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 «
-46 -33 -34 -25 -33 -18 -26 -21 -23 -24 -26 -32 -47 -45 -47 -43 -48 -48 -43 -44 -46 -36 -32 -18 -31 -37 -32 -29 -29 -40 -26 -29 -19 -30 -12 -24 -40 -43 -49 -49 -48 -33 -46 -46 -43 -44 -38 -38 -39 -47 -41 -36 -38 -11 -24 -30 -18 -21 -22 -15 -15 -16 -26 -39 -28 -25 -25 -13 -20 -13 -10 -19 -31 -36 -26 -33 -42 -44 -45 -42 -60 -42 -63 -71
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1-46NANA1.05149101308296NA
2-33NANA1.14744145995573NA
3-34NANA1.13701088537295NA
4-25NANA1.20863595304480NA
5-33NANA1.18822773919206NA
6-18NANA1.01579941181016NA
7-26-28.9615379965479-28.45833333333331.017682155076350.897742378291482
8-21-27.8361109027388-290.959865893197890.754415732620673
9-23-26.5320376584586-30.04166666666670.8831746238599250.866876502139573
10-24-27.6368324934234-31.33333333333330.8820265689390430.868406319925093
11-26-24.2321360008155-32.70833333333330.740855113400731.07295535148552
12-32-26.5527092477475-34.58333333333330.7677891830673981.20515009227221
13-47-38.4232341030733-36.54166666666671.051491013082961.22321821931800
14-45-43.8418257824751-38.20833333333331.147441459955731.02641710733652
15-47-45.6225617755896-40.1251.137010885372951.03019204031518
16-43-50.2591117141129-41.58333333333331.208635953044800.855566255221449
17-48-50.3016409591304-42.33333333333331.188227739192060.954243223178335
18-48-42.6635752960269-421.015799411810161.12508151665550
19-43-41.4705478193614-40.751.017682155076351.03688044313523
20-44-38.1546692546162-39.750.959865893197891.15320092821082
21-46-34.2598156172329-38.79166666666670.8831746238599251.34268089805077
22-36-33.1494985492924-37.58333333333330.8820265689390431.08598927813249
23-32-26.8251288977181-36.20833333333330.740855113400731.19291132288733
24-18-26.9366038392812-35.08333333333330.7677891830673980.668235688039889
25-31-35.7945065703658-34.04166666666671.051491013082960.86605468185626
26-37-37.5308977527186-32.70833333333331.147441459955730.985854381735908
27-32-35.1999619930043-30.95833333333331.137010885372950.909091890677603
28-29-35.7554802775753-29.58333333333331.208635953044800.811064479483104
29-29-33.8644905669737-28.51.188227739192060.856354237564768
30-40-28.3577335797004-27.91666666666671.015799411810161.41054996118003
31-26-29.0463448428042-28.54166666666671.017682155076350.895121232661434
32-29-27.9960885516052-29.16666666666670.959865893197891.03585898960651
33-19-26.6056355437802-30.1250.8831746238599250.714134415948645
34-30-27.9308413497364-31.66666666666670.8820265689390431.07408150095998
35-12-24.6643014836326-33.29166666666670.740855113400730.486533138105017
36-24-25.9448761444858-33.79166666666670.7677891830673980.925038141109061
37-40-36.1011914491817-34.33333333333331.051491013082961.10799667252829
38-43-41.1644623759118-35.8751.147441459955731.04459034609334
39-49-42.7326591086001-37.58333333333331.137010885372951.14666395731359
40-49-47.3382414942546-39.16666666666671.208635953044801.03510393401384
41-48-48.5192993503424-40.83333333333331.188227739192060.98929705586652
42-33-43.171475001932-42.51.015799411810160.764393618668883
43-46-43.8027360914113-43.04166666666671.017682155076351.05016270910573
44-46-41.4342110563756-43.16666666666670.959865893197891.11019369808712
45-43-37.9765088259768-430.8831746238599251.13227890949752
46-44-37.1553692165572-42.1250.8820265689390431.18421646528526
47-38-30.4985355016634-41.16666666666670.740855113400731.24596146585227
48-38-30.5836024588514-39.83333333333330.7677891830673981.24249587834288
49-39-39.9566584971526-381.051491013082960.976057595075906
50-47-41.7859931667211-36.41666666666671.147441459955731.12477881792771
51-41-39.4637528131528-34.70833333333331.137010885372951.03892805618667
52-36-39.5324676308403-32.70833333333331.208635953044800.910643887352872
53-38-36.9340788932198-31.08333333333331.188227739192061.02886009719809
54-11-29.9237576729077-29.45833333333331.015799411810160.367600891580509
55-24-27.9862592645997-27.51.017682155076350.857563698423891
56-30-24.1966193910302-25.20833333333330.959865893197891.23984262078864
57-18-20.5706089474041-23.29166666666670.8831746238599250.875034863869284
58-21-20.1028555504024-22.79166666666670.8820265689390431.04462771208539
59-22-16.6692400515164-22.50.740855113400731.31979621938426
60-15-17.4032214828610-22.66666666666670.7677891830673980.861909389291646
61-15-24.490978179724-23.29166666666671.051491013082960.612470432578248
62-16-25.9608630314983-22.6251.147441459955730.616312330625803
63-26-25.0142394782049-221.137010885372951.03940797491181
64-39-26.2878319787244-21.751.208635953044801.48357612874139
65-28-24.8537635447672-20.91666666666671.188227739192061.12658994077761
66-25-20.9085378930925-20.58333333333331.015799411810161.19568379806505
67-25-21.7953594878852-21.41666666666671.017682155076351.14703315693857
68-13-21.9969267191183-22.91666666666670.959865893197890.590991649242584
69-20-20.9753973166732-23.750.8831746238599250.953498029050545
70-13-20.7276243700675-23.50.8820265689390430.627182342168123
71-10-17.6570468693840-23.83333333333330.740855113400730.566346120841941
72-19-19.3546856564907-25.20833333333330.7677891830673980.981674429500656
73-31-28.2150088510595-26.83333333333331.051491013082961.09870601719963
74-36-33.1323721562216-28.8751.147441459955731.08655063483705
75-26-36.1000956105912-31.751.137010885372950.72021969915149
76-33-41.8490198741762-34.6251.208635953044800.788548933743688
77-42-45.2021635784312-38.04166666666671.188227739192060.929159063971018
78-44-43.0868250509478-42.41666666666671.015799411810161.02119383240637
79-45NANA1.01768215507635NA
80-42NANA0.95986589319789NA
81-60NANA0.883174623859925NA
82-42NANA0.882026568939043NA
83-63NANA0.74085511340073NA
84-71NANA0.767789183067398NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/1jdtx1243860655.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/1jdtx1243860655.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/2f12a1243860655.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/2f12a1243860655.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/32pip1243860655.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/32pip1243860655.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/4bfbl1243860655.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t12438609077edjx47xt869pcz/4bfbl1243860655.ps (open in new window)


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