Home » date » 2010 » Jan » 12 »

Opgave 9 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 12 Jan 2010 13:22:07 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce.htm/, Retrieved Tue, 12 Jan 2010 21:23:02 +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/Jan/12/t1263327775lhmblpoco5p2oce.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
161,88 162,05 162,16 162,61 162,53 162,53 162,53 162,53 162,83 161,61 161,79 161,79 161,79 161,79 161,85 161,77 161,86 161,89 161,89 161,89 162,18 162,43 162,58 162,57 162,57 162,57 162,44 162,79 163,15 163,23 163,23 163,23 163,38 163,71 163,73 163,73 163,73 163,73 163,93 164,27 164,57 164,73 164,73 164,76 165,75 165,86 165,99 166,13 166,13 166,13 166,15 166,45 166,48 166,51 166,51 166,51 166,58 166,82 167,35 167,5 167,5 167,6 167,72 167,29 166,98 166,98 166,98 166,98 167,63 167,83 167,85 167,87 167,87 167,96 167,7 169,25 168,79 168,77 168,77 169 168,92 169,23 169,28 169,29 169,29 170,29 170,59 171,98 172,31 172,28 172,28 172,45 172,27 172,65 172,08 172,2 172,2 172,2 172,36 172,53 173,18 173,17 173,17 173,17 173,4 174,47 174,56 174,59 174,59 175,22 175,3 175,25 175,54 175,58 175,58 175,68 176,05 176,4 176,58 176,49
 
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
1161.88NANA-0.143094135802472NA
2162.05NANA-0.062168209876544NA
3162.16NANA-0.123140432098758NA
4162.61NANA0.140516975308634NA
5162.53NANA0.145794753086419NA
6162.53NANA0.0403780864197411NA
7162.53162.191026234568162.232916666667-0.04189043209877210.338973765432115
8162.53162.104405864198162.218333333333-0.1139274691358070.42559413580247
9162.83162.227739197531162.1945833333330.03315586419753490.602260802469146
10161.61162.246026234568162.1466666666670.0993595679012479-0.636026234567879
11161.79162.131026234568162.083750.0472762345679114-0.341026234567892
12161.79162.006905864198162.029166666667-0.0222608024691350-0.216905864197543
13161.79161.832739197531161.975833333333-0.143094135802472-0.0427391975308637
14161.79161.860331790123161.9225-0.062168209876544-0.070331790123447
15161.85161.745609567901161.86875-0.1231404320987580.104390432098768
16161.77162.016350308642161.8758333333330.140516975308634-0.246350308641894
17161.86162.088711419753161.9429166666670.145794753086419-0.22871141975304
18161.89162.048711419753162.0083333333330.0403780864197411-0.158711419753047
19161.89162.031442901235162.073333333333-0.0418904320987721-0.141442901234569
20161.89162.024405864198162.138333333333-0.113927469135807-0.134405864197532
21162.18162.228572530864162.1954166666670.0331558641975349-0.0485725308641918
22162.43162.361859567901162.26250.09935956790124790.068140432098744
23162.58162.406026234568162.358750.04727623456791140.173973765432095
24162.57162.446072530864162.468333333333-0.02226080246913500.123927469135793
25162.57162.436905864198162.58-0.1430941358024720.133094135802452
26162.57162.62949845679162.691666666667-0.062168209876544-0.0594984567900951
27162.44162.674359567901162.7975-0.123140432098758-0.234359567901237
28162.79163.041350308642162.9008333333330.140516975308634-0.251350308642003
29163.15163.147878086420163.0020833333330.1457947530864190.00212191358025393
30163.23163.138711419753163.0983333333330.04037808641974110.0912885802468963
31163.23163.153109567901163.195-0.04189043209877210.0768904320987644
32163.23163.177739197531163.291666666667-0.1139274691358070.0522608024691635
33163.38163.435239197531163.4020833333330.0331558641975349-0.0552391975308524
34163.71163.625192901235163.5258333333330.09935956790124790.0848070987654523
35163.73163.693942901235163.6466666666670.04727623456791140.0360570987654398
36163.73163.746072530864163.768333333333-0.0222608024691350-0.0160725308641929
37163.73163.750239197531163.893333333333-0.143094135802472-0.0202391975308842
38163.73163.957415123457164.019583333333-0.062168209876544-0.227415123456808
39163.93164.058942901235164.182083333333-0.123140432098758-0.128942901234581
40164.27164.510933641975164.3704166666670.140516975308634-0.240933641975289
41164.57164.699961419753164.5541666666670.145794753086419-0.129961419753101
42164.73164.788711419753164.7483333333330.0403780864197411-0.0587114197530809
43164.73164.906442901235164.948333333333-0.0418904320987721-0.176442901234566
44164.76165.034405864198165.148333333333-0.113927469135807-0.274405864197519
45165.75165.373989197531165.3408333333330.03315586419753490.376010802469125
46165.86165.623526234568165.5241666666670.09935956790124790.236473765432095
47165.99165.741859567901165.6945833333330.04727623456791140.248140432098808
48166.13165.826072530864165.848333333333-0.02226080246913500.3039274691358
49166.13165.853572530864165.996666666667-0.1430941358024720.276427469135797
50166.13166.081581790123166.14375-0.0621682098765440.0484182098765302
51166.15166.128109567901166.25125-0.1231404320987580.0218904320987576
52166.45166.466350308642166.3258333333330.140516975308634-0.0163503086419894
53166.48166.568294753086166.42250.145794753086419-0.0882947530864158
54166.51166.576628086420166.536250.0403780864197411-0.0666280864197404
55166.51166.608526234568166.650416666667-0.0418904320987721-0.0985262345679132
56166.51166.654822530864166.76875-0.113927469135807-0.144822530864218
57166.58166.928572530864166.8954166666670.0331558641975349-0.348572530864203
58166.82167.095192901235166.9958333333330.0993595679012479-0.275192901234561
59167.35167.098942901235167.0516666666670.04727623456791140.251057098765443
60167.5167.069822530864167.092083333333-0.02226080246913500.430177469135828
61167.5166.988155864197167.13125-0.1430941358024720.511844135802505
62167.6167.10824845679167.170416666667-0.0621682098765440.491751543209887
63167.72167.110609567901167.23375-0.1231404320987580.609390432098763
64167.29167.460100308642167.3195833333330.140516975308634-0.170100308641963
65166.98167.528294753086167.38250.145794753086419-0.548294753086424
66166.98167.459128086420167.418750.0403780864197411-0.479128086419735
67166.98167.407692901235167.449583333333-0.0418904320987721-0.427692901234536
68166.98167.366072530864167.48-0.113927469135807-0.386072530864141
69167.63167.527322530864167.4941666666670.03315586419753490.102677469135813
70167.83167.674359567901167.5750.09935956790124790.155640432098807
71167.85167.779359567901167.7320833333330.04727623456791140.0706404320987701
72167.87167.859822530864167.882083333333-0.02226080246913500.0101774691358116
73167.87167.888155864198168.03125-0.143094135802472-0.0181558641975244
74167.96168.127831790123168.19-0.062168209876544-0.167831790123472
75167.7168.204776234568168.327916666667-0.123140432098758-0.504776234567942
76169.25168.580516975309168.440.1405169753086340.669483024691345
77168.79168.703711419753168.5579166666670.1457947530864190.0862885802469009
78168.77168.717044753086168.6766666666670.04037808641974110.0529552469135979
79168.77168.753109567901168.795-0.04189043209877210.0168904320987906
80169168.837322530864168.95125-0.1139274691358070.162677469135843
81168.92169.201905864198169.168750.0331558641975349-0.28190586419754
82169.23169.502276234568169.4029166666670.0993595679012479-0.272276234567926
83169.28169.710609567901169.6633333333330.0472762345679114-0.430609567901229
84169.29169.933989197531169.95625-0.0222608024691350-0.643989197530857
85169.29170.105655864198170.24875-0.143094135802472-0.815655864197538
86170.29170.476581790123170.53875-0.062168209876544-0.186581790123427
87170.59170.698942901235170.822083333333-0.123140432098758-0.108942901234542
88171.98171.244683641975171.1041666666670.1405169753086340.735316358024733
89172.31171.509128086420171.3633333333330.1457947530864190.800871913580266
90172.28171.641628086420171.601250.04037808641974110.638371913580272
91172.28171.801859567901171.84375-0.04189043209877210.478140432098741
92172.45171.930655864198172.044583333333-0.1139274691358070.519344135802413
93172.27172.231072530864172.1979166666670.03315586419753490.0389274691358139
94172.65172.393942901235172.2945833333330.09935956790124790.256057098765467
95172.08172.401026234568172.353750.0472762345679114-0.321026234567853
96172.2172.404822530864172.427083333333-0.0222608024691350-0.204822530864192
97172.2172.358155864197172.50125-0.143094135802472-0.158155864197511
98172.2172.506165123457172.568333333333-0.062168209876544-0.306165123456765
99172.36172.522276234568172.645416666667-0.123140432098758-0.162276234567884
100172.53172.908850308642172.7683333333330.140516975308634-0.378850308641944
101173.18173.093294753086172.94750.1457947530864190.0867052469135956
102173.17173.190794753086173.1504166666670.0403780864197411-0.0207947530864487
103173.17173.307692901235173.349583333333-0.0418904320987721-0.137692901234601
104173.17173.461072530864173.575-0.113927469135807-0.291072530864255
105173.4173.856489197531173.8233333333330.0331558641975349-0.456489197530885
106174.47174.158526234568174.0591666666670.09935956790124790.311473765432083
107174.56174.318109567901174.2708333333330.04727623456791140.241890432098756
108174.59174.447322530864174.469583333333-0.02226080246913500.142677469135805
109174.59174.527322530864174.670416666667-0.1430941358024720.0626774691358207
110175.22174.81324845679174.875416666667-0.0621682098765440.406751543209879
111175.3174.967276234568175.090416666667-0.1231404320987580.332723765432092
112175.25175.421766975309175.281250.140516975308634-0.171766975308685
113175.54175.591628086420175.4458333333330.145794753086419-0.0516280864197824
114175.58175.649544753086175.6091666666670.0403780864197411-0.0695447530864044
115175.58NANA-0.0418904320987721NA
116175.68NANA-0.113927469135807NA
117176.05NANA0.0331558641975349NA
118176.4NANA0.0993595679012479NA
119176.58NANA0.0472762345679114NA
120176.49NANA-0.0222608024691350NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/1g41z1263327724.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/1g41z1263327724.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/2bbbx1263327724.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/2bbbx1263327724.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/355cb1263327724.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/355cb1263327724.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/4j5n01263327724.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263327775lhmblpoco5p2oce/4j5n01263327724.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