Home » date » 2008 » May » 25 »

Opgave 9 oef 2 Classical Deomposition- Michiel Van Schaik

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 11:08:40 -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/t1211735389xassivgkxarc48g.htm/, Retrieved Sun, 25 May 2008 19:09:49 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
65.05 65.84 66.6 67.55 68.07 69.06 69.06 69.11 69.29 69.38 69.28 69.75 69.9 70.21 70.48 71.55 72.18 72.64 72.77 72.74 73.13 73.44 73.34 73.34 73.81 74.26 74.72 75.11 75.26 75.89 75.91 76.43 76.56 76.76 76.76 76.56 76.82 77.09 77.51 77.76 77.86 77.89 77.94 77.99 78.17 78.91 78.87 78.88 79.08 79.41 79.51 79.73 80.38 80.56 80.46 80.45 80.58 80.68 80.52 81.49 81.66 81.95 82.3 82.4 83.14 83.17 83.11 83.21 83.33 83.88 83.8 83.73
 
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 time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
165.05NANA-0.295564236111109NA
265.84NANA-0.192439236111114NA
366.6NANA-0.115668402777769NA
467.55NANA0.13151909722223NA
568.07NANA0.279227430555557NA
669.06NANA0.364852430555543NA
769.0668.517144097222268.37208333333330.1450607638888880.542855902777788
869.1168.789019097222268.756250.03276909722222740.320980902777762
969.2969.094852430555669.1-0.005147569444451010.195147569444444
1069.3869.524539930555569.42833333333330.0962065972222265-0.144539930555553
1169.2869.560269097222269.76625-0.205980902777779-0.280269097222202
1269.7569.851831597222270.0866666666667-0.234835069444448-0.101831597222215
1369.970.094852430555670.3904166666667-0.295564236111109-0.194852430555557
1470.2170.503810763888970.69625-0.192439236111114-0.293810763888899
1570.4870.891831597222271.0075-0.115668402777769-0.411831597222232
1671.5571.468185763888971.33666666666670.131519097222230.0818142361111143
1772.1871.954227430555571.6750.2792274305555570.225772569444459
1872.6472.358602430555571.993750.3648524305555430.281397569444451
1972.7772.451310763888972.306250.1450607638888880.318689236111112
2072.7472.670685763888972.63791666666670.03276909722222740.0693142361111114
2173.1372.978185763888972.9833333333333-0.005147569444451010.151814236111107
2273.4473.404539930555573.30833333333330.09620659722222650.0354600694444542
2373.3473.379019097222273.585-0.205980902777779-0.0390190972221944
2473.3473.613914930555673.84875-0.234835069444448-0.273914930555549
2573.8173.819435763888974.115-0.295564236111109-0.0094357638888738
2674.2674.207144097222274.3995833333333-0.1924392361111140.0528559027777931
2774.7274.580581597222274.69625-0.1156684027777690.139418402777778
2875.1175.109019097222274.97750.131519097222230.000980902777783399
2975.2675.537560763888975.25833333333330.279227430555557-0.277560763888886
3075.8975.899852430555675.5350.364852430555543-0.0098524305555685
3175.9175.939644097222275.79458333333330.145060763888888-0.0296440972222314
3276.4376.070685763888976.03791666666670.03276909722222740.359314236111118
3376.5676.266935763888976.2720833333333-0.005147569444451010.293064236111121
3476.7676.594956597222276.498750.09620659722222650.165043402777798
3576.7676.511519097222276.7175-0.2059809027777790.248480902777771
3676.5676.674331597222276.9091666666667-0.234835069444448-0.114331597222218
3776.8276.781519097222277.0770833333333-0.2955642361111090.0384809027777635
3877.0977.034227430555577.2266666666667-0.1924392361111140.0557725694444571
3977.5177.243081597222277.35875-0.1156684027777690.26691840277779
4077.7677.646935763888977.51541666666670.131519097222230.113064236111128
4177.8677.972144097222277.69291666666670.279227430555557-0.112144097222213
4277.8978.242352430555677.87750.364852430555543-0.352352430555555
4377.9478.213394097222278.06833333333330.145060763888888-0.273394097222223
4477.9978.291935763888978.25916666666670.0327690972222274-0.301935763888892
4578.1778.434019097222278.4391666666667-0.00514756944445101-0.264019097222231
4678.9178.700789930555578.60458333333330.09620659722222650.209210069444453
4778.8778.585685763888978.7916666666667-0.2059809027777790.284314236111115
4878.8878.773081597222279.0079166666667-0.2348350694444480.106918402777765
4979.0878.928602430555679.2241666666667-0.2955642361111090.151397569444441
5079.4179.239227430555679.4316666666667-0.1924392361111140.170772569444438
5179.5179.518914930555579.6345833333333-0.115668402777769-0.00891493055553383
5279.7379.940269097222279.808750.13151909722223-0.210269097222209
5380.3880.230477430555579.951250.2792274305555570.149522569444457
5480.5680.493602430555580.128750.3648524305555430.0663975694444616
5580.4680.490060763888980.3450.145060763888888-0.0300607638888835
5680.4580.591102430555680.55833333333330.0327690972222274-0.141102430555549
5780.5880.775269097222280.7804166666667-0.00514756944445101-0.195269097222223
5880.6881.104123263888981.00791666666670.0962065972222265-0.424123263888887
5980.5281.028185763888981.2341666666667-0.205980902777779-0.508185763888889
6081.4981.223081597222281.4579166666667-0.2348350694444480.266918402777776
6181.6681.381519097222281.6770833333333-0.2955642361111090.278480902777758
6281.9581.710060763888981.9025-0.1924392361111140.239939236111113
6382.382.016414930555682.1320833333333-0.1156684027777690.283585069444442
6482.482.511519097222282.380.13151909722223-0.111519097222214
6583.1482.929227430555682.650.2792274305555570.210772569444444
6683.1783.244852430555582.880.364852430555543-0.0748524305555236
6783.11NANA0.145060763888888NA
6883.21NANA0.0327690972222274NA
6983.33NANA-0.00514756944445101NA
7083.88NANA0.0962065972222265NA
7183.8NANA-0.205980902777779NA
7283.73NANA-0.234835069444448NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211735389xassivgkxarc48g/1tfo51211735312.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211735389xassivgkxarc48g/1tfo51211735312.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211735389xassivgkxarc48g/3efnk1211735312.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211735389xassivgkxarc48g/3efnk1211735312.ps (open in new window)


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