Home » date » 2010 » Dec » 08 »

Opgave 9 - oefening 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 08 Dec 2010 18:19:16 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff.htm/, Retrieved Wed, 08 Dec 2010 19:24:42 +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/2010/Dec/08/t12918326827j9l5irj32qi7ff.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
105,23 105,22 105,13 105 105,01 105,01 105,01 105,01 105,57 106,05 106,09 106,2 106,19 106,2 106,09 106,23 106,23 106,22 106,22 106,61 106,95 107,74 107,8 107,8 107,2 107,56 107,72 108,14 108,16 108,16 108,16 108,1 108,95 110,49 110,72 110,82 110,82 110,75 110,71 110,86 110,84 110,84 110,84 110,92 111,46 112,46 113,04 113,15 113,15 113,21 113,37 113,47 113,71 113,71 113,71 113,8 115,46 117 117,94 118,08 118,08 118,47 118,49 118,45 118,54 118,55 118,55 118,55 119,04 121,37 122 122,14
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1105.23NANA0.285319444444454NA
2105.22NANA0.209652777777771NA
3105.13NANA0.0225694444444462NA
4105NANA-0.0633472222222333NA
5105.01NANA-0.257597222222224NA
6105.01NANA-0.523013888888897NA
7105.01104.741569444444105.4175-0.6759305555555580.268430555555554
8105.01104.704902777778105.498333333333-0.793430555555550.305097222222216
9105.57105.353986111111105.579166666667-0.2251805555555530.216013888888895
10106.05106.291819444444105.6704166666670.621402777777778-0.241819444444431
11106.09106.539069444444105.77250.766569444444452-0.449069444444447
12106.2106.506736111111105.873750.632986111111115-0.306736111111093
13106.19106.259902777778105.9745833333330.285319444444454-0.0699027777777701
14106.2106.301319444444106.0916666666670.209652777777771-0.101319444444428
15106.09106.238402777778106.2158333333330.0225694444444462-0.148402777777747
16106.23106.280402777778106.34375-0.0633472222222333-0.050402777777748
17106.23106.227819444444106.485416666667-0.2575972222222240.00218055555558294
18106.22106.100319444444106.623333333333-0.5230138888888970.119680555555576
19106.22106.056152777778106.732083333333-0.6759305555555580.163847222222245
20106.61106.037402777778106.830833333333-0.793430555555550.572597222222242
21106.95106.730236111111106.955416666667-0.2251805555555530.21976388888892
22107.74107.724319444444107.1029166666670.6214027777777780.0156805555555763
23107.8108.029486111111107.2629166666670.766569444444452-0.229486111111100
24107.8108.057152777778107.4241666666670.632986111111115-0.257152777777748
25107.2107.871152777778107.5858333333330.285319444444454-0.671152777777749
26107.56107.938402777778107.728750.209652777777771-0.378402777777765
27107.72107.896736111111107.8741666666670.0225694444444462-0.176736111111097
28108.14108.008736111111108.072083333333-0.06334722222223330.131263888888896
29108.16108.050736111111108.308333333333-0.2575972222222240.10926388888889
30108.16108.032819444444108.555833333333-0.5230138888888970.127180555555569
31108.16108.156569444444108.8325-0.6759305555555580.00343055555553917
32108.1108.322819444444109.11625-0.79343055555555-0.222819444444454
33108.95109.148569444444109.37375-0.225180555555553-0.198569444444459
34110.49110.233069444444109.6116666666670.6214027777777780.256930555555556
35110.72110.603236111111109.8366666666670.7665694444444520.116763888888897
36110.82110.692986111111110.060.6329861111111150.127013888888897
37110.82110.568652777778110.2833333333330.2853194444444540.251347222222236
38110.75110.722152777778110.51250.2096527777777710.0278472222222348
39110.71110.757152777778110.7345833333330.0225694444444462-0.0471527777777681
40110.86110.857902777778110.92125-0.06334722222223330.00209722222223263
41110.84110.842402777778111.1-0.257597222222224-0.00240277777774622
42110.84110.770736111111111.29375-0.5230138888888970.0692638888889121
43110.84110.811986111111111.487916666667-0.6759305555555580.028013888888907
44110.92110.894069444444111.6875-0.793430555555550.0259305555555613
45111.46111.675652777778111.900833333333-0.225180555555553-0.215652777777777
46112.46112.741819444444112.1204166666670.621402777777778-0.281819444444437
47113.04113.115319444444112.348750.766569444444452-0.075319444444446
48113.15113.220902777778112.5879166666670.632986111111115-0.0709027777777607
49113.15113.112402777778112.8270833333330.2853194444444540.0375972222222316
50113.21113.276319444444113.0666666666670.209652777777771-0.0663194444444599
51113.37113.375902777778113.3533333333330.0225694444444462-0.00590277777776294
52113.47113.645819444444113.709166666667-0.0633472222222333-0.175819444444457
53113.71113.844902777778114.1025-0.257597222222224-0.134902777777782
54113.71113.989069444444114.512083333333-0.523013888888897-0.279069444444460
55113.71114.246986111111114.922916666667-0.675930555555558-0.536986111111119
56113.8114.554069444444115.3475-0.79343055555555-0.75406944444444
57115.46115.554819444444115.78-0.225180555555553-0.0948194444444255
58117116.822236111111116.2008333333330.6214027777777780.177763888888904
59117.94117.376152777778116.6095833333330.7665694444444520.563847222222222
60118.08117.645486111111117.01250.6329861111111150.434513888888887
61118.08117.701152777778117.4158333333330.2853194444444540.378847222222205
62118.47118.025069444444117.8154166666670.2096527777777710.444930555555544
63118.49118.185069444444118.16250.02256944444444620.304930555555543
64118.45118.430402777778118.49375-0.06334722222223330.0195972222222309
65118.54118.587402777778118.845-0.257597222222224-0.0474027777777621
66118.55118.660319444444119.183333333333-0.523013888888897-0.110319444444443
67118.55NANA-0.675930555555558NA
68118.55NANA-0.79343055555555NA
69119.04NANA-0.225180555555553NA
70121.37NANA0.621402777777778NA
71122NANA0.766569444444452NA
72122.14NANA0.632986111111115NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/1ctaj1291832352.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/1ctaj1291832352.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/2ctaj1291832352.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/2ctaj1291832352.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/3nl941291832352.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/3nl941291832352.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/4nl941291832352.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918326827j9l5irj32qi7ff/4nl941291832352.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