Home » date » 2008 » May » 19 » attachments

opgave 9 oef 2

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 19 May 2008 07:01:06 -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/19/t1211202387mr17v9saxfe2drn.htm/, Retrieved Mon, 19 May 2008 15:06:32 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13.42NANA-0.0538715277777776NA
23.42NANA-0.000538194444444399NA
33.43NANA0.0176909722222225NA
43.47NANA0.00831597222222232NA
53.51NANA0.00644097222222236NA
63.52NANA0.0345659722222221NA
73.523.520190972222223.4950.0251909722222223-0.000190972222222641
83.523.516649305555563.503333333333330.0133159722222220.00335069444444436
93.523.525815972222223.513750.0120659722222222-0.00581597222222285
103.523.522065972222223.52541666666667-0.00335069444444439-0.00206597222222316
113.523.513940972222223.535-0.02105902777777790.006059027777777
123.523.504149305555563.54291666666667-0.03876736111111140.0158506944444441
133.523.496545138888893.55041666666667-0.05387152777777760.0234548611111105
143.523.558211805555563.55875-0.000538194444444399-0.038211805555556
153.583.587690972222223.570.0176909722222225-0.00769097222222248
163.63.592065972222223.583750.008315972222222320.00793402777777752
173.613.604357638888893.597916666666670.006440972222222360.00564236111111116
183.613.646649305555563.612083333333330.0345659722222221-0.0366493055555552
193.613.651440972222223.626250.0251909722222223-0.041440972222222
203.633.653732638888893.640416666666670.013315972222222-0.0237326388888883
213.683.664149305555563.652083333333330.01206597222222220.0158506944444445
223.693.657065972222223.66041666666667-0.003350694444444390.0329340277777774
233.693.646440972222223.6675-0.02105902777777790.0435590277777775
243.693.639149305555563.67791666666667-0.03876736111111140.0508506944444438
253.693.638628472222223.6925-0.05387152777777760.0513715277777766
263.693.706128472222223.70666666666667-0.000538194444444399-0.0161284722222232
273.693.736024305555563.718333333333330.0176909722222225-0.0460243055555565
283.693.736232638888893.727916666666670.00831597222222232-0.0462326388888896
293.693.743524305555563.737083333333330.00644097222222236-0.0535243055555563
303.783.780815972222223.746250.0345659722222221-0.00081597222222296
313.793.781024305555563.755833333333330.02519097222222230.00897569444444413
323.793.784982638888893.771666666666670.0133159722222220.00501736111111128
333.83.807065972222223.7950.0120659722222222-0.0070659722222226
343.83.817065972222223.82041666666667-0.00335069444444439-0.0170659722222224
353.83.827690972222223.84875-0.0210590277777779-0.0276909722222221
363.83.841232638888893.88-0.0387673611111114-0.0412326388888880
373.813.858628472222223.9125-0.0538715277777776-0.0486284722222212
383.953.945711805555553.94625-0.0005381944444443990.00428819444444573
393.993.997690972222223.980.0176909722222225-0.0076909722222207
4044.021649305555564.013333333333330.00831597222222232-0.0216493055555551
414.064.053107638888894.046666666666670.006440972222222360.00689236111111136
424.164.114565972222224.080.03456597222222210.0454340277777776
434.194.139357638888894.114166666666670.02519097222222230.0506423611111115
444.24.162899305555564.149583333333330.0133159722222220.0371006944444439
454.24.197899305555564.185833333333330.01206597222222220.00210069444444461
464.24.219149305555564.2225-0.00335069444444439-0.0191493055555556
474.24.235607638888894.25666666666667-0.0210590277777779-0.0356076388888891
484.24.245399305555564.28416666666667-0.0387673611111114-0.0453993055555557
494.234.252378472222224.30625-0.0538715277777776-0.022378472222222
504.384.326128472222224.32666666666667-0.0005381944444443990.053871527777777
514.434.364774305555564.347083333333330.01769097222222250.065225694444444
524.444.376232638888894.367916666666670.008315972222222320.0637673611111111
534.444.395190972222224.388750.006440972222222360.0448090277777782
544.444.444149305555564.409583333333330.0345659722222221-0.00414930555555593
554.444.454357638888894.429166666666670.0251909722222223-0.0143576388888889
564.444.454565972222224.441250.013315972222222-0.0145659722222229
574.454.457065972222224.4450.0120659722222222-0.0070659722222226
584.454.442899305555564.44625-0.003350694444444390.0071006944444445
594.454.426440972222224.4475-0.02105902777777790.0235590277777771
604.454.410399305555564.44916666666667-0.03876736111111140.0396006944444443
614.454.396961805555564.45083333333333-0.05387152777777760.0530381944444436
624.454.452795138888894.45333333333333-0.000538194444444399-0.00279513888888960
634.454.478107638888894.460416666666670.0176909722222225-0.0281076388888906
644.454.483315972222224.4750.00831597222222232-0.0333159722222236
654.464.500190972222224.493750.00644097222222236-0.0401909722222236
664.464.547482638888894.512916666666670.0345659722222221-0.0874826388888899
674.46NANA0.0251909722222223NA
684.48NANA0.013315972222222NA
694.58NANA0.0120659722222222NA
704.67NANA-0.00335069444444439NA
714.68NANA-0.0210590277777779NA
724.68NANA-0.0387673611111114NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/1yof31211202064.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/1yof31211202064.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/2n5qn1211202064.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/2n5qn1211202064.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/3bolp1211202064.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/3bolp1211202064.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/44e611211202064.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t1211202387mr17v9saxfe2drn/44e611211202064.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