Home » date » 2009 » Jun » 03 »

Opgave 9 oefening 2 - Renske van der Eijk - Decompositiemodel

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 03 Jun 2009 03:11:31 -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/03/t12440203309twloq40ss2hcfn.htm/, Retrieved Wed, 03 Jun 2009 11:12:15 +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/03/t12440203309twloq40ss2hcfn.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 «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1464NANA-497.527777777778NA
2675NANA-330.886111111111NA
3703NANA-215.119444444444NA
4887NANA-93.6694444444444NA
51139NANA127.538888888889NA
61077NANA137.255555555556NA
713181376.96388888889966.25410.713888888889-58.9638888888888
812601488.62222222222977.666666666667510.955555555556-228.622222222222
911201012.72222222222994.29166666666718.4305555555556107.277777777778
10963899.9722222222221008.83333333333-108.86111111111163.0277777777777
11996976.8805555555561017.91666666667-41.03611111111119.1194444444442
129601111.372222222221029.1666666666782.2055555555555-151.372222222222
13530550.6805555555551048.20833333333-497.527777777778-20.6805555555554
14883740.8222222222221071.70833333333-330.886111111111142.177777777778
15894867.9638888888891083.08333333333-215.11944444444426.0361111111113
161045985.7055555555561079.375-93.669444444444459.2944444444445
1711991205.538888888891078127.538888888889-6.53888888888878
1812871220.047222222221082.79166666667137.25555555555666.9527777777778
1915651498.380555555561087.66666666667410.71388888888966.6194444444445
2015771588.872222222221077.91666666667510.955555555556-11.8722222222223
2110761082.263888888891063.8333333333318.4305555555556-6.26388888888891
22918948.5138888888891057.375-108.861111111111-30.5138888888887
2310081006.088888888891047.125-41.0361111111111.91111111111127
2410631112.497222222221030.2916666666782.2055555555555-49.497222222222
25544516.7638888888891014.29166666667-497.52777777777827.2361111111112
26635664.572222222222995.458333333333-330.886111111111-29.5722222222222
27804769.380555555556984.5-215.11944444444434.6194444444444
28980895.372222222222989.041666666667-93.669444444444484.6277777777779
2910181119.45555555556991.916666666667127.538888888889-101.455555555556
3010641126.67222222222989.416666666667137.255555555556-62.672222222222
3114041401.08888888889990.375410.7138888888892.91111111111127
3212861507.91388888889996.958333333333510.955555555556-221.913888888889
3311041020.180555555561001.7518.430555555555683.8194444444445
34999893.9305555555561002.79166666667-108.861111111111105.069444444444
35996972.1305555555551013.16666666667-41.03611111111123.8694444444445
3610151121.413888888891039.2083333333382.2055555555555-106.413888888889
37615562.0555555555551059.58333333333-497.52777777777852.9444444444446
38722751.1138888888891082-330.886111111111-29.1138888888886
39832886.4222222222221101.54166666667-215.119444444444-54.422222222222
409771007.122222222221100.79166666667-93.6694444444444-30.1222222222220
4112701232.413888888891104.875127.53888888888937.5861111111112
4214371257.005555555561119.75137.255555555556179.994444444445
4315201542.047222222221131.33333333333410.713888888889-22.0472222222222
4417081650.288888888891139.33333333333510.95555555555657.7111111111112
4511511169.097222222221150.6666666666718.4305555555556-18.0972222222224
469341054.763888888891163.625-108.861111111111-120.763888888889
4711591136.547222222221177.58333333333-41.03611111111122.4527777777778
4812091260.663888888891178.4583333333382.2055555555555-51.663888888889
49699683.6805555555551181.20833333333-497.52777777777815.3194444444446
50830882.9472222222221213.83333333333-330.886111111111-52.9472222222223
519961024.005555555561239.125-215.119444444444-28.0055555555552
5211241160.622222222221254.29166666667-93.6694444444444-36.6222222222220
5314581399.038888888891271.5127.53888888888958.9611111111112
5412701438.963888888891301.70833333333137.255555555556-168.963888888889
5517531742.797222222221332.08333333333410.71388888888910.2027777777776
5622581854.580555555561343.625510.955555555556403.419444444444
5712081376.013888888891357.5833333333318.4305555555556-168.013888888889
5812411259.097222222221367.95833333333-108.861111111111-18.0972222222219
5912651333.630555555561374.66666666667-41.036111111111-68.6305555555552
6018281470.330555555561388.12582.2055555555555357.669444444445
61809885.0972222222221382.625-497.527777777778-76.0972222222222
629971028.822222222221359.70833333333-330.886111111111-31.8222222222223
6311641143.505555555561358.625-215.11944444444420.4944444444445
6412051283.455555555561377.125-93.6694444444444-78.4555555555553
6515381527.830555555561400.29166666667127.53888888888910.1694444444447
6615131529.588888888891392.33333333333137.255555555556-16.5888888888890
671378NANA410.713888888889NA
682083NANA510.955555555556NA
691357NANA18.4305555555556NA
701536NANA-108.861111111111NA
711526NANA-41.036111111111NA
721376NANA82.2055555555555NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/1hxrc1244020287.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/1hxrc1244020287.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/202da1244020287.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/202da1244020287.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/3afw21244020287.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/3afw21244020287.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/4caao1244020287.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/03/t12440203309twloq40ss2hcfn/4caao1244020287.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