Home » date » 2008 » May » 25 »

Opgave9,oef2 Willem Dierickx

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 25 May 2008 15:42:41 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7.htm/, Retrieved Sun, 25 May 2008 23:47:55 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3,35 3,35 3,35 3,4 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,43 3,47 3,51 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,58 3,6 3,61 3,61 3,61 3,63 3,68 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,78 3,79 3,79 3,8 3,8 3,8 3,8 3,81 3,95 3,99 4 4,06 4,16 4,19 4,2 4,2 4,2 4,2 4,2 4,23 4,38 4,43 4,44 4,44 4,44 4,44 4,44 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,46 4,46 4,46 4,48 4,58 4,67 4,68 4,68
 
Text written by user:
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13.35NANA-0.0384652777777779NA
23.35NANA-0.0474652777777776NA
33.35NANA-0.00646527777777777NA
43.4NANA0.0084513888888891NA
53.42NANA0.00728472222222233NA
63.42NANA0.0121180555555556NA
73.423.438701388888893.403750.0349513888888888-0.0187013888888887
83.423.435368055555563.409583333333330.0257847222222223-0.0153680555555558
93.423.430034722222223.415416666666670.0146180555555554-0.0100347222222221
103.423.431118055555563.419583333333330.0115347222222222-0.0111180555555559
113.423.419784722222223.42291666666667-0.003131944444444450.000215277777777523
123.423.409534722222223.42875-0.0192152777777780.0104652777777776
133.423.398201388888893.43666666666667-0.03846527777777790.0217986111111110
143.423.397534722222223.445-0.04746527777777760.0224652777777772
153.423.446868055555563.45333333333333-0.00646527777777777-0.0268680555555565
163.433.470118055555563.461666666666670.0084513888888891-0.0401180555555563
173.473.477284722222223.470.00728472222222233-0.00728472222222276
183.513.490451388888893.478333333333330.01211805555555560.0195486111111101
193.523.521618055555563.486666666666670.0349513888888888-0.00161805555555583
203.523.520784722222223.4950.0257847222222223-0.000784722222222811
213.523.517951388888893.503333333333330.01461805555555540.00204861111111088
223.523.525284722222223.513750.0115347222222222-0.00528472222222298
233.523.522284722222223.52541666666667-0.00313194444444445-0.00228472222222287
243.523.515784722222223.535-0.0192152777777780.00421527777777708
253.523.504451388888893.54291666666667-0.03846527777777790.0155486111111109
263.523.502951388888893.55041666666667-0.04746527777777760.0170486111111106
273.523.552284722222223.55875-0.00646527777777777-0.0322847222222227
283.583.578451388888893.570.00845138888888910.00154861111111071
293.63.591034722222223.583750.007284722222222330.00896527777777756
303.613.610034722222223.597916666666670.0121180555555556-3.47222222223387e-05
313.613.647034722222223.612083333333330.0349513888888888-0.0370347222222218
323.613.652034722222223.626250.0257847222222223-0.0420347222222222
333.633.655034722222223.640416666666670.0146180555555554-0.0250347222222218
343.683.663618055555563.652083333333330.01153472222222220.0163819444444444
353.693.657284722222223.66041666666667-0.003131944444444450.0327152777777777
363.693.648284722222223.6675-0.0192152777777780.0417152777777776
373.693.639451388888893.67791666666667-0.03846527777777790.0505486111111106
383.693.645034722222223.6925-0.04746527777777760.0449652777777767
393.693.700201388888893.70666666666667-0.00646527777777777-0.0102013888888899
403.693.726784722222223.718333333333330.0084513888888891-0.0367847222222233
413.693.735201388888893.727916666666670.00728472222222233-0.0452013888888896
423.693.749201388888893.737083333333330.0121180555555556-0.0592013888888898
433.783.781201388888893.746250.0349513888888888-0.00120138888888954
443.793.781618055555563.755833333333330.02578472222222230.00838194444444396
453.793.786284722222223.771666666666670.01461805555555540.0037152777777778
463.83.806534722222223.7950.0115347222222222-0.00653472222222273
473.83.817284722222223.82041666666667-0.00313194444444445-0.0172847222222221
483.83.829534722222223.84875-0.019215277777778-0.029534722222222
493.83.841534722222223.88-0.0384652777777779-0.0415347222222211
503.813.865034722222223.9125-0.0474652777777776-0.0550347222222212
513.953.939784722222223.94625-0.006465277777777770.0102152777777791
523.993.988451388888893.980.00845138888888910.00154861111111249
5344.020618055555564.013333333333330.00728472222222233-0.0206180555555551
544.064.058784722222224.046666666666670.01211805555555560.00121527777777786
554.164.114951388888894.080.03495138888888880.0450486111111115
564.194.139951388888894.114166666666670.02578472222222230.0500486111111114
574.24.164201388888894.149583333333330.01461805555555540.0357986111111108
584.24.197368055555564.185833333333330.01153472222222220.00263194444444448
594.24.219368055555564.2225-0.00313194444444445-0.0193680555555558
604.24.237451388888894.25666666666667-0.019215277777778-0.037451388888889
614.24.245701388888894.28416666666667-0.0384652777777779-0.0457013888888893
624.234.258784722222224.30625-0.0474652777777776-0.0287847222222224
634.384.320201388888894.32666666666667-0.006465277777777770.0597986111111108
644.434.355534722222224.347083333333330.00845138888888910.0744652777777777
654.444.375201388888894.367916666666670.007284722222222330.0647986111111107
664.444.400868055555564.388750.01211805555555560.0391319444444447
674.444.444534722222224.409583333333330.0349513888888888-0.00453472222222207
684.444.454951388888894.429166666666670.0257847222222223-0.0149513888888890
694.444.455868055555564.441250.0146180555555554-0.0158680555555559
704.454.456534722222224.4450.0115347222222222-0.00653472222222273
714.454.443118055555564.44625-0.003131944444444450.00688194444444434
724.454.428284722222224.4475-0.0192152777777780.0217152777777772
734.454.410701388888894.44916666666667-0.03846527777777790.0392986111111107
744.454.403368055555564.45083333333333-0.04746527777777760.0466319444444432
754.454.446868055555564.45333333333333-0.006465277777777770.0031319444444442
764.454.468868055555564.460416666666670.0084513888888891-0.0188680555555569
774.454.482284722222224.4750.00728472222222233-0.032284722222224
784.464.505868055555564.493750.0121180555555556-0.0458680555555571
794.464.547868055555564.512916666666670.0349513888888888-0.087868055555556
804.46NANA0.0257847222222223NA
814.48NANA0.0146180555555554NA
824.58NANA0.0115347222222222NA
834.67NANA-0.00313194444444445NA
844.68NANA-0.019215277777778NA
854.68NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/1142a1211751754.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/1142a1211751754.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/2tagy1211751754.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/2tagy1211751754.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/30qxv1211751754.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/30qxv1211751754.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/4kzxq1211751754.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211752070c06n74ne5edt5u7/4kzxq1211751754.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