Home » date » 2009 » Jan » 14 »

Opgave 9-oefening2-decompositie-veerle van rompay

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 14 Jan 2009 06:30:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk.htm/, Retrieved Wed, 14 Jan 2009 14:32:29 +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/2009/Jan/14/t12319399490ngchqnf2s92ayk.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 «
113,9000 112,0000 113,8500 113,0800 111,7200 110,6900 113,5300 113,9900 112,7400 112,1500 115,8200 118,3800 118,8100 123,8500 117,9600 120,1600 118,7400 119,8400 124,8100 121,3300 120,2000 118,3200 129,5800 130,2000 127,1900 133,1000 129,1200 123,2800 123,3600 124,1300 126,9700 127,1400 123,7000 123,6700 130,1900 134,0100 124,9600 129,9600 128,3200 132,3800 126,2500 128,9100 131,4200 129,4400 126,8600 126,7100 131,6300 132,7800 126,6100 132,8400 123,1400 128,1300 125,4900 126,4800 130,8600 127,3200 126,5600 126,6400 129,2600 126,4700 135,4000 135,5000 132,2200 122,6200 125,1600 128,5000 133,8600 128,8700 125,0700 125,2500 132,1600 130,2400
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1113.9NANA0.84165277777778NA
2112NANA5.00423611111111NA
3113.85NANA-0.120513888888895NA
4113.08NANA-1.17043055555555NA
5111.72NANA-2.92976388888889NA
6110.69NANA-1.39276388888889NA
7113.53115.183986111111113.6920833333331.49190277777777-1.65398611111110
8113.99113.833319444444114.390416666667-0.557097222222230.156680555555553
9112.74112.317402777778115.055416666667-2.738013888888890.422597222222223
10112.15112.037069444444115.521666666667-3.484597222222220.112930555555550
11115.82118.231069444444116.1091666666672.12190277777779-2.41106944444445
12118.38119.716402777778116.7829166666672.93348611111111-1.33640277777776
13118.81118.475819444444117.6341666666670.841652777777780.334180555555562
14123.85123.414236111111118.415.004236111111110.435763888888886
15117.96118.906152777778119.026666666667-0.120513888888895-0.946152777777783
16120.16118.424152777778119.594583333333-1.170430555555551.73584722222222
17118.74117.495236111111120.425-2.929763888888891.24476388888890
18119.84120.098069444444121.490833333333-1.39276388888889-0.258069444444445
19124.81123.824402777778122.33251.491902777777770.98559722222224
20121.33122.509986111111123.067083333333-0.55709722222223-1.17998611111111
21120.2121.179486111111123.9175-2.73801388888889-0.9794861111111
22118.32121.027902777778124.5125-3.48459722222222-2.70790277777776
23129.58126.956902777778124.8352.121902777777792.62309722222223
24130.2128.139736111111125.206252.933486111111112.06026388888888
25127.19126.316652777778125.4750.841652777777780.873347222222236
26133.1130.811319444444125.8070833333335.004236111111112.28868055555557
27129.12126.074486111111126.195-0.1205138888888953.04551388888891
28123.28125.393319444444126.56375-1.17043055555555-2.11331944444444
29123.36123.882319444444126.812083333333-2.92976388888889-0.522319444444435
30124.13125.603486111111126.99625-1.39276388888889-1.47348611111111
31126.97128.553986111111127.0620833333331.49190277777777-1.58398611111110
32127.14126.281236111111126.838333333333-0.557097222222230.858763888888888
33123.7123.936152777778126.674166666667-2.73801388888889-0.236152777777761
34123.67123.535402777778127.02-3.484597222222220.134597222222212
35130.19129.641486111111127.5195833333332.121902777777790.548513888888891
36134.01130.772652777778127.8391666666672.933486111111113.23734722222224
37124.96129.065402777778128.223750.84165277777778-4.10540277777775
38129.96133.509236111111128.5055.00423611111111-3.5492361111111
39128.32128.611986111111128.7325-0.120513888888895-0.291986111111100
40132.38127.820402777778128.990833333333-1.170430555555554.55959722222224
41126.25126.247736111111129.1775-2.929763888888890.00226388888890483
42128.91127.793486111111129.18625-1.392763888888891.11651388888890
43131.42130.695652777778129.203751.491902777777770.724347222222235
44129.44128.835402777778129.3925-0.557097222222230.604597222222253
45126.86126.558652777778129.296666666667-2.738013888888890.301347222222233
46126.71125.419152777778128.90375-3.484597222222221.29084722222225
47131.63130.816902777778128.6952.121902777777790.81309722222224
48132.78131.495569444444128.5620833333332.933486111111111.28443055555559
49126.61129.279152777778128.43750.84165277777778-2.66915277777778
50132.84133.330069444444128.3258333333335.00423611111111-0.490069444444458
51123.14128.104486111111128.225-0.120513888888895-4.9644861111111
52128.13127.039152777778128.209583333333-1.170430555555551.09084722222224
53125.49125.178152777778128.107916666667-2.929763888888890.311847222222241
54126.48126.353486111111127.74625-1.392763888888890.126513888888908
55130.86129.341486111111127.8495833333331.491902777777771.51851388888892
56127.32127.769569444444128.326666666667-0.55709722222223-0.449569444444435
57126.56126.077819444444128.815833333333-2.738013888888890.482180555555573
58126.64125.479986111111128.964583333333-3.484597222222221.16001388888893
59129.26130.843152777778128.721252.12190277777779-1.58315277777777
60126.47131.725152777778128.7916666666672.93348611111111-5.25515277777777
61135.4129.842486111111129.0008333333330.841652777777785.55751388888891
62135.5134.194652777778129.1904166666675.004236111111111.30534722222225
63132.22129.072402777778129.192916666667-0.1205138888888953.14759722222223
64122.62127.902486111111129.072916666667-1.17043055555555-5.28248611111107
65125.16126.206069444444129.135833333333-2.92976388888889-1.04606944444444
66128.5128.020986111111129.41375-1.392763888888890.479013888888886
67133.86NANA1.49190277777777NA
68128.87NANA-0.55709722222223NA
69125.07NANA-2.73801388888889NA
70125.25NANA-3.48459722222222NA
71132.16NANA2.12190277777779NA
72130.24NANA2.93348611111111NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/1fmb41231939836.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/1fmb41231939836.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/2ypi81231939836.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/2ypi81231939836.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/3q8421231939836.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/3q8421231939836.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/4opts1231939836.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t12319399490ngchqnf2s92ayk/4opts1231939836.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