Home » date » 2011 » May » 16 »

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: Mon, 16 May 2011 18:12:08 +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/16/t13055693025aw30tsjshgc0yo.htm/, Retrieved Mon, 16 May 2011 20:08:26 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8 8 8,2 8,5 8,7 8,7 8 8 8,3 8,5 8,7 8,6 8,3 7,9 7,9 8,1 8,3 8,1 7,4 7,3 7,7 8 8 7,7 6,9 6,6 6,9 7,5 7,9 7,7 6,5 6,1 6,4 6,8 7,1 7,3 7,2 7 7 7 7,3 7,5 7,2 7,7 8 7,9 8 8 7,9 7,9 8 8,1 8,1 8,2 8 8,3 8,5 8,6 8,7 8,7 8,5 8,4 8,5 8,7 8,7 8,6 7,9 8,1 8,2 8,5 8,6 8,5
 
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
18NANA-0.0541666666666664NA
28NANA-0.254166666666666NA
38.2NANA-0.154166666666666NA
48.5NANA0.0666666666666666NA
58.7NANA0.2475NA
68.7NANA0.209166666666666NA
787.9858.3625-0.37750.0150000000000006
888.045833333333338.37083333333333-0.325-0.0458333333333325
98.38.323333333333338.35416666666667-0.0308333333333333-0.0233333333333317
108.58.478.3250.1450.0300000000000011
118.78.5758.291666666666670.2833333333333330.125
128.68.494166666666678.250.2441666666666660.105833333333333
138.38.145833333333338.2-0.05416666666666640.154166666666669
147.97.891666666666678.14583333333333-0.2541666666666660.00833333333333464
157.97.93758.09166666666667-0.154166666666666-0.0374999999999979
168.18.11258.045833333333330.0666666666666666-0.0124999999999993
178.38.243333333333337.995833333333330.24750.0566666666666675
188.18.138333333333337.929166666666670.209166666666666-0.0383333333333331
197.47.455833333333337.83333333333333-0.3775-0.0558333333333323
207.37.395833333333337.72083333333333-0.325-0.0958333333333323
217.77.594166666666677.625-0.03083333333333330.105833333333335
2287.703333333333337.558333333333330.1450.296666666666668
2387.87.516666666666670.2833333333333330.2
247.77.72757.483333333333330.244166666666666-0.0274999999999999
256.97.3757.42916666666667-0.0541666666666664-0.475000000000001
266.67.08757.34166666666667-0.254166666666666-0.487500000000001
276.97.083333333333337.2375-0.154166666666666-0.183333333333334
287.57.27.133333333333330.06666666666666660.300000000000001
297.97.293333333333337.045833333333330.24750.606666666666667
307.77.200833333333336.991666666666670.2091666666666660.499166666666667
316.56.616.9875-0.3775-0.109999999999999
326.16.691666666666677.01666666666667-0.325-0.591666666666667
336.47.006666666666677.0375-0.0308333333333333-0.606666666666666
346.87.165833333333337.020833333333330.145-0.365833333333332
357.17.258333333333336.9750.283333333333333-0.158333333333332
367.37.185833333333336.941666666666670.2441666666666660.114166666666668
377.26.908333333333336.9625-0.05416666666666640.291666666666669
3876.804166666666677.05833333333333-0.2541666666666660.195833333333335
3977.03757.19166666666667-0.154166666666666-0.0374999999999988
4077.370833333333337.304166666666670.0666666666666666-0.370833333333332
417.37.6357.38750.2475-0.334999999999998
427.57.663333333333337.454166666666660.209166666666666-0.163333333333331
437.27.1357.5125-0.37750.0650000000000013
447.77.254166666666677.57916666666667-0.3250.445833333333335
4587.62757.65833333333333-0.03083333333333330.372500000000001
467.97.890833333333337.745833333333330.1450.00916666666666721
4788.108333333333337.8250.283333333333333-0.108333333333333
4888.131666666666677.88750.244166666666666-0.131666666666665
497.97.895833333333337.95-0.05416666666666640.00416666666666643
507.97.754166666666678.00833333333333-0.2541666666666660.145833333333334
5187.98.05416666666667-0.1541666666666660.0999999999999996
528.18.170833333333338.104166666666670.0666666666666666-0.0708333333333346
538.18.418.16250.2475-0.31
548.28.438.220833333333330.209166666666666-0.23
5587.89758.275-0.37750.102499999999999
568.37.995833333333338.32083333333333-0.3250.304166666666667
578.58.331666666666678.3625-0.03083333333333330.168333333333333
588.68.553333333333338.408333333333330.1450.0466666666666669
598.78.741666666666678.458333333333330.283333333333333-0.0416666666666661
608.78.744166666666668.50.244166666666666-0.0441666666666656
618.58.458333333333338.5125-0.05416666666666640.0416666666666679
628.48.245833333333338.5-0.2541666666666660.154166666666669
638.58.3258.47916666666666-0.1541666666666660.175000000000002
648.78.529166666666668.46250.06666666666666660.170833333333336
658.78.701666666666678.454166666666670.2475-0.00166666666666693
668.68.650833333333338.441666666666670.209166666666666-0.0508333333333333
677.9NANA-0.3775NA
688.1NANA-0.325NA
698.2NANA-0.0308333333333333NA
708.5NANA0.145NA
718.6NANA0.283333333333333NA
728.5NANA0.244166666666666NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/1a9tq1305569526.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/1a9tq1305569526.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/24y8l1305569526.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/24y8l1305569526.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/3ltfx1305569526.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/3ltfx1305569526.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/4x06x1305569526.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t13055693025aw30tsjshgc0yo/4x06x1305569526.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