Home » date » 2010 » Aug » 13 »

Tijdreeks 1 - stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 13 Aug 2010 14:52:27 +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/Aug/13/t1281711698q8o6ijm14hdopiy.htm/, Retrieved Fri, 13 Aug 2010 17:01:39 +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/2010/Aug/13/t1281711698q8o6ijm14hdopiy.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:
Reuben Vermoet
 
Dataseries X:
» Textbox « » Textfile « » CSV «
210 209 208 206 226 225 210 200 201 201 202 204 197 196 187 196 221 218 200 191 194 192 199 196 182 178 169 177 207 213 191 182 188 189 194 195 171 165 156 170 201 208 189 175 184 187 193 199 179 188 171 182 212 216 192 182 183 183 187 190 167 167 158 171 201 208 181 169 173 180 181 192 169 168 156 161 195 208 176 164 170 175 170 175 148 151 143 139 166 186 149 142 138 137 130 138 118 113 99 93 125 146 109 97 97 94 92 103 78 72 57 40 70 89 53 46 43 38 29 34
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1210NANA-9.77430555555556NA
2209NANA-9.55671296296297NA
3208NANA-19.4456018518519NA
4206NANA-14.2928240740741NA
5226NANA17.1516203703704NA
6225NANA29.1840277777778NA
7210210.827546296296207.9583333333332.86921296296296-0.827546296296276
8200200.434027777778206.875-6.44097222222222-0.434027777777771
9201203.239583333333205.458333333333-2.21875-2.23958333333331
10201204.52662037037204.1666666666670.359953703703702-3.52662037037038
11202206.503472222222203.5416666666672.96180555555556-4.50347222222217
12204212.244212962963203.0416666666679.2025462962963-8.24421296296296
13197192.559027777778202.333333333333-9.774305555555564.44097222222223
14196191.984953703704201.541666666667-9.556712962962974.0150462962963
15187181.429398148148200.875-19.44560185185195.57060185185185
16196185.915509259259200.208333333333-14.292824074074110.0844907407408
17221216.859953703704199.70833333333317.15162037037044.14004629629633
18218228.434027777778199.2529.1840277777778-10.4340277777778
19200201.16087962963198.2916666666672.86921296296296-1.16087962962965
20191190.475694444444196.916666666667-6.440972222222220.524305555555571
21194193.197916666667195.416666666667-2.218750.802083333333343
22192194.234953703704193.8750.359953703703702-2.23495370370364
23199195.461805555556192.52.961805555555563.53819444444449
24196200.91087962963191.7083333333339.2025462962963-4.91087962962962
25182181.350694444444191.125-9.774305555555560.649305555555571
26178180.818287037037190.375-9.55671296296297-2.81828703703704
27169170.304398148148189.75-19.4456018518519-1.30439814814815
28177175.082175925926189.375-14.29282407407411.91782407407408
29207206.193287037037189.04166666666717.15162037037040.806712962962962
30213217.975694444444188.79166666666729.1840277777778-4.97569444444446
31191191.16087962963188.2916666666672.86921296296296-0.160879629629676
32182180.850694444444187.291666666667-6.440972222222221.14930555555554
33188183.989583333333186.208333333333-2.218754.01041666666669
34189185.734953703704185.3750.3599537037037023.2650462962963
35194187.795138888889184.8333333333332.961805555555566.20486111111114
36195193.577546296296184.3759.20254629629631.42245370370372
37171174.309027777778184.083333333333-9.77430555555556-3.30902777777777
38165174.15162037037183.708333333333-9.55671296296297-9.15162037037038
39156163.804398148148183.25-19.4456018518519-7.80439814814815
40170168.707175925926183-14.29282407407411.2928240740741
41201200.02662037037182.87517.15162037037040.97337962962962
42208212.18402777777818329.1840277777778-4.18402777777774
43189186.369212962963183.52.869212962962962.63078703703707
44175178.350694444444184.791666666667-6.44097222222222-3.3506944444444
45184184.15625186.375-2.21875-0.156249999999972
46187187.859953703704187.50.359953703703702-0.859953703703695
47193191.420138888889188.4583333333332.961805555555561.57986111111111
48199198.452546296296189.259.20254629629630.547453703703695
49179179.934027777778189.708333333333-9.77430555555556-0.934027777777828
50188180.568287037037190.125-9.556712962962977.43171296296293
51171170.929398148148190.375-19.44560185185190.0706018518518192
52182175.873842592593190.166666666667-14.29282407407416.12615740740742
53212206.90162037037189.7517.15162037037045.09837962962962
54216218.309027777778189.12529.1840277777778-2.30902777777774
55192191.119212962963188.252.869212962962960.880787037037038
56182180.434027777778186.875-6.440972222222221.56597222222226
57183183.239583333333185.458333333333-2.21875-0.239583333333314
58183184.818287037037184.4583333333330.359953703703702-1.81828703703701
59187186.503472222222183.5416666666672.961805555555560.4965277777778
60190191.952546296296182.759.2025462962963-1.95254629629628
61167172.184027777778181.958333333333-9.77430555555556-5.1840277777778
62167171.40162037037180.958333333333-9.55671296296297-4.40162037037038
63158160.554398148148180-19.4456018518519-2.55439814814818
64171165.165509259259179.458333333333-14.29282407407415.83449074074073
65201196.234953703704179.08333333333317.15162037037044.7650462962963
66208208.100694444444178.91666666666729.1840277777778-0.1006944444444
67181181.952546296296179.0833333333332.86921296296296-0.952546296296276
68169172.767361111111179.208333333333-6.44097222222222-3.76736111111109
69173176.947916666667179.166666666667-2.21875-3.94791666666666
70180179.02662037037178.6666666666670.3599537037037020.973379629629648
71181180.9618055555561782.961805555555560.0381944444444287
72192186.952546296296177.759.20254629629635.0474537037037
73169167.767361111111177.541666666667-9.774305555555561.23263888888889
74168167.568287037037177.125-9.556712962962970.43171296296299
75156157.346064814815176.791666666667-19.4456018518519-1.34606481481484
76161162.165509259259176.458333333333-14.2928240740741-1.16550925925927
77195192.943287037037175.79166666666717.15162037037042.05671296296296
78208203.809027777778174.62529.18402777777784.19097222222223
79176175.91087962963173.0416666666672.869212962962960.0891203703703809
80164165.017361111111171.458333333333-6.44097222222222-1.01736111111111
81170167.989583333333170.208333333333-2.218752.01041666666666
82175169.109953703704168.750.3599537037037025.89004629629628
83170169.586805555556166.6252.961805555555560.413194444444457
84175173.702546296296164.59.20254629629631.29745370370372
85148152.684027777778162.458333333333-9.77430555555556-4.68402777777777
86151150.859953703704160.416666666667-9.556712962962970.140046296296305
87143138.721064814815158.166666666667-19.44560185185194.27893518518519
88139140.957175925926155.25-14.2928240740741-1.9571759259259
89166169.1516203703715217.1516203703704-3.15162037037038
90186177.975694444444148.79166666666729.18402777777788.02430555555557
91149148.8692129629631462.869212962962960.130787037037038
92142136.725694444444143.166666666667-6.440972222222225.27430555555557
93138137.53125139.75-2.218750.46875
94137136.3599537037041360.3599537037037020.640046296296305
95130135.336805555556132.3752.96180555555556-5.33680555555556
96138138.2025462962961299.2025462962963-0.202546296296305
97118115.892361111111125.666666666667-9.774305555555562.1076388888889
98113112.568287037037122.125-9.556712962962970.431712962962962
999999.0960648148148118.541666666667-19.4456018518519-0.0960648148147953
10093100.748842592593115.041666666667-14.2928240740741-7.74884259259258
101125128.818287037037111.66666666666717.1516203703704-3.81828703703705
102146137.809027777778108.62529.18402777777788.19097222222223
103109108.369212962963105.52.869212962962960.630787037037024
1049795.6840277777778102.125-6.440972222222221.31597222222221
1059796.447916666666798.6666666666667-2.218750.552083333333329
1069495.06828703703794.70833333333330.359953703703702-1.06828703703702
1079293.170138888888990.20833333333332.96180555555556-1.17013888888887
10810394.74421296296385.54166666666669.20254629629638.25578703703705
1097871.059027777777880.8333333333333-9.774305555555566.94097222222223
1107266.81828703703776.375-9.556712962962975.18171296296296
1115752.554398148148172-19.44560185185194.44560185185186
1124053.123842592592667.4166666666667-14.2928240740741-13.1238425925926
1137079.609953703703762.458333333333317.1516203703704-9.6099537037037
1148986.142361111111156.958333333333329.18402777777782.85763888888889
11553NANA2.86921296296296NA
11646NANA-6.44097222222222NA
11743NANA-2.21875NA
11838NANA0.359953703703702NA
11929NANA2.96180555555556NA
12034NANA9.2025462962963NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/12igc1281711143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/12igc1281711143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/22igc1281711143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/22igc1281711143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/3drgf1281711143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/3drgf1281711143.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/4drgf1281711143.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281711698q8o6ijm14hdopiy/4drgf1281711143.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.01 ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ; par3 = 0.01 ;
 
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