Home » date » 2010 » Aug » 06 »

tijdreeks 2 - stap 24

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 06 Aug 2010 07:48:35 +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/06/t1281080895pjgdfqs26he8zsn.htm/, Retrieved Fri, 06 Aug 2010 09:48:17 +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/06/t1281080895pjgdfqs26he8zsn.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:
Van de Walle Mathias
 
Dataseries X:
» Textbox « » Textfile « » CSV «
239 238 237 235 233 232 233 235 236 236 237 239 238 237 244 230 237 244 239 240 230 228 231 228 225 227 238 214 222 233 228 218 203 209 207 203 195 199 207 182 181 189 186 174 153 158 153 147 143 156 168 142 146 150 145 133 111 115 109 105 96 112 127 107 116 125 120 107 86 87 79 83 75 89 104 86 98 98 85 74 49 54 47 56
 
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
1239NANA-9.94965277777778NA
2238NANA0.196180555555558NA
3237NANA13.9461805555556NA
4235NANA-4.65798611111111NA
5233NANA4.42534722222222NA
6232NANA13.515625NA
7233243.786458333333235.7916666666677.99479166666666-10.7864583333333
8235238.543402777778235.7083333333332.83506944444444-3.54340277777774
9236226.085069444444235.958333333333-9.873263888888889.91493055555557
10236230.460069444444236.041666666667-5.581597222222225.5399305555556
11237229.557291666667236-6.442708333333337.44270833333331
12239230.258680555556236.666666666667-6.40798611111118.74131944444449
13238227.467013888889237.416666666667-9.9496527777777810.5329861111111
14237238.071180555556237.8750.196180555555558-1.07118055555554
15244251.779513888889237.83333333333313.9461805555556-7.77951388888891
16230232.592013888889237.25-4.65798611111111-2.59201388888889
17237241.092013888889236.6666666666674.42534722222222-4.09201388888889
18244249.473958333333235.95833333333313.515625-5.47395833333331
19239242.953125234.9583333333337.99479166666666-3.95312499999997
20240236.8350694444442342.835069444444443.16493055555557
21230223.460069444444233.333333333333-9.873263888888886.53993055555557
22228226.835069444444232.416666666667-5.581597222222221.16493055555557
23231224.682291666667231.125-6.442708333333336.31770833333334
24228223.633680555556230.041666666667-6.40798611111114.36631944444449
25225219.175347222222229.125-9.949652777777785.82465277777777
26227227.946180555556227.750.196180555555558-0.946180555555543
27238239.654513888889225.70833333333313.9461805555556-1.65451388888889
28214219.133680555556223.791666666667-4.65798611111111-5.13368055555551
29222226.4253472222222224.42534722222222-4.42534722222223
30233233.473958333333219.95833333333313.515625-0.473958333333343
31228225.661458333333217.6666666666677.994791666666662.33854166666669
32218218.085069444444215.252.83506944444444-0.0850694444444287
33203202.918402777778212.791666666667-9.873263888888880.081597222222257
34209204.585069444444210.166666666667-5.581597222222224.4149305555556
35207200.682291666667207.125-6.442708333333336.31770833333337
36203197.175347222222203.583333333333-6.40798611111115.8246527777778
37195190.050347222222200-9.949652777777784.9496527777778
38199196.612847222222196.4166666666670.1961805555555582.38715277777777
39207206.446180555556192.513.94618055555560.553819444444457
40182183.633680555556188.291666666667-4.65798611111111-1.63368055555554
41181188.342013888889183.9166666666674.42534722222222-7.34201388888889
42189192.848958333333179.33333333333313.515625-3.84895833333334
43186182.828125174.8333333333337.994791666666663.171875
44174173.710069444444170.8752.835069444444440.2899305555556
45153157.585069444444167.458333333333-9.87326388888888-4.58506944444443
46158158.585069444444164.166666666667-5.58159722222222-0.585069444444457
47153154.598958333333161.041666666667-6.44270833333333-1.59895833333334
48147151.550347222222157.958333333333-6.4079861111111-4.55034722222223
49143144.675347222222154.625-9.94965277777778-1.67534722222223
50156151.404513888889151.2083333333330.1961805555555584.59548611111109
51168161.696180555556147.7513.94618055555566.30381944444446
52142139.550347222222144.208333333333-4.657986111111112.44965277777777
53146145.008680555556140.5833333333334.425347222222220.991319444444457
54150150.51562513713.515625-0.515625
55145141.286458333333133.2916666666677.994791666666663.71354166666669
56133132.335069444444129.52.835069444444440.664930555555571
57111116.085069444444125.958333333333-9.87326388888888-5.08506944444443
58115117.210069444444122.791666666667-5.58159722222222-2.21006944444443
59109113.640625120.083333333333-6.44270833333333-4.64062499999999
60105111.383680555556117.791666666667-6.4079861111111-6.38368055555554
6196105.758680555556115.708333333333-9.94965277777778-9.75868055555553
62112113.779513888889113.5833333333330.196180555555558-1.77951388888887
63127125.404513888889111.45833333333313.94618055555561.59548611111113
64107104.592013888889109.25-4.657986111111112.40798611111113
65116111.258680555556106.8333333333334.425347222222224.74131944444446
66125118.182291666667104.66666666666713.5156256.81770833333336
67120110.869791666667102.8757.994791666666669.13020833333336
68107103.876736111111101.0416666666672.835069444444443.12326388888889
698689.251736111111199.125-9.87326388888888-3.25173611111113
708791.710069444444497.2916666666667-5.58159722222222-4.71006944444444
717989.223958333333395.6666666666667-6.44270833333333-10.2239583333333
728387.383680555555693.7916666666667-6.4079861111111-4.38368055555556
737581.258680555555691.2083333333333-9.94965277777778-6.25868055555556
748988.571180555555588.3750.1961805555555580.428819444444457
7510499.404513888888985.458333333333313.94618055555564.59548611111113
768677.883680555555582.5416666666667-4.657986111111118.11631944444446
779884.258680555555579.83333333333334.4253472222222213.7413194444445
789890.89062577.37513.5156257.10937500000001
7985NANA7.99479166666666NA
8074NANA2.83506944444444NA
8149NANA-9.87326388888888NA
8254NANA-5.58159722222222NA
8347NANA-6.44270833333333NA
8456NANA-6.4079861111111NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/1d1lm1281080910.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/1d1lm1281080910.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/2d1lm1281080910.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/2d1lm1281080910.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/3ot381281080910.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/3ot381281080910.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/4ot381281080910.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/06/t1281080895pjgdfqs26he8zsn/4ot381281080910.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