Home » date » 2009 » Jun » 07 »

Opgave 9 Oefening 2 Anke Winckelmans

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 07 Jun 2009 09:45:48 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8.htm/, Retrieved Sun, 07 Jun 2009 17:48:08 +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/2009/Jun/07/t12443896843zgb4a0vcyrijy8.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3779.7 3795.5 3813.1 3826.9 3833.3 3844.8 3851.3 3851.8 3854.1 3858.4 3861.6 3856.3 3855.8 3860.4 3855.1 3839.5 3833 3833.6 3826.8 3818.2 3811.4 3806.8 3810.3 3818.2 3858.9 3867.8 3872.3 3873.3 3876.7 3882.6 3883.5 3882.2 3888.1 3893.7 3901.9 3914.3 3930.3 3948.3 3971.5 3990.1 3993 3998 4015.8 4041.2 4060.7 4076.7 4103 4125.3 4139.7 4146.7 4158 4155.1 4144.8 4148.2 4142.5 4142.1 4145.4 4146.3 4143.5 4149.2 4158.9 4166.1 4179.1 4194.4 4211.7 4226.3 4235.8 4243.6 4258.7 4278.2 4298 4315.1 4334.3 4356 4374 4395.5
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13779.7NANA-0.152083333333394NA
23795.5NANA0.343055555555465NA
33813.13811.118055555563810.50.6180555555556061.98194444444425
43826.93822.553472222223823.3625-0.8090277777776774.34652777777774
53833.33834.147916666673834.3-0.152083333333394-0.847916666666151
63844.83842.530555555563842.18750.3430555555554652.26944444444462
73851.33848.518055555563847.90.6180555555556062.78194444444443
83851.83851.390972222223852.2-0.8090277777776770.409027777777737
93854.13855.035416666673855.1875-0.152083333333394-0.935416666666242
103858.43857.380555555563857.03750.3430555555554651.01944444444462
113861.63858.430555555563857.81250.6180555555556063.16944444444425
123856.33857.465972222223858.275-0.809027777777677-1.16597222222208
133855.83857.560416666673857.7125-0.152083333333394-1.76041666666606
143860.43855.143055555563854.80.3430555555554655.2569444444448
153855.13850.468055555563849.850.6180555555556064.63194444444434
163839.53842.840972222223843.65-0.809027777777677-3.34097222222226
1738333836.610416666673836.7625-0.152083333333394-3.61041666666642
183833.63830.905555555563830.56250.3430555555554652.69444444444434
193826.83825.818055555563825.20.6180555555556060.981944444444252
203818.23818.340972222223819.15-0.809027777777677-0.140972222221990
213811.43813.585416666673813.7375-0.152083333333394-2.18541666666624
223806.83812.018055555563811.6750.343055555555465-5.21805555555557
233810.33818.230555555563817.61250.618055555555606-7.93055555555566
243818.23830.365972222223831.175-0.809027777777677-12.1659722222221
253858.93846.397916666673846.55-0.15208333333339412.5020833333338
263867.83861.530555555563861.18750.3430555555554656.26944444444462
273872.33870.918055555563870.30.6180555555556061.38194444444434
283873.33873.565972222223874.375-0.809027777777677-0.265972222221535
293876.73877.472916666673877.625-0.152083333333394-0.772916666666333
303882.63880.480555555563880.13750.3430555555554652.11944444444407
313883.53883.293055555563882.6750.6180555555556060.206944444444161
323882.23884.678472222223885.4875-0.809027777777677-2.47847222222208
333888.13889.022916666673889.175-0.152083333333394-0.922916666666879
343893.73895.830555555563895.48750.343055555555465-2.13055555555593
353901.93905.393055555563904.7750.618055555555606-3.4930555555552
363914.33916.065972222223916.875-0.809027777777677-1.76597222222199
373930.33932.247916666673932.4-0.152083333333394-1.94791666666697
383948.33950.918055555563950.5750.343055555555465-2.61805555555566
393971.53968.505555555563967.88750.6180555555556062.99444444444407
403990.13981.128472222223981.9375-0.8090277777776778.97152777777774
4139933993.535416666673993.6875-0.152083333333394-0.535416666666606
4239984005.955555555564005.61250.343055555555465-7.9555555555553
434015.84021.080555555564020.46250.618055555555606-5.28055555555511
444041.24037.953472222224038.7625-0.8090277777776773.24652777777783
454060.74059.347916666674059.5-0.1520833333333941.35208333333367
464076.74081.255555555564080.91250.343055555555465-4.55555555555566
4741034101.918055555554101.30.6180555555556061.08194444444507
484125.34119.115972222224119.925-0.8090277777776776.18402777777828
494139.74135.397916666674135.55-0.1520833333333944.30208333333303
504146.74146.493055555564146.150.3430555555554650.206944444444161
5141584151.130555555564150.51250.6180555555556066.86944444444453
524155.14150.528472222224151.3375-0.8090277777776774.5715277777781
534144.84149.435416666674149.5875-0.152083333333394-4.63541666666606
544148.24146.368055555554146.0250.3430555555554651.83194444444507
554142.54145.093055555564144.4750.618055555555606-2.59305555555602
564142.14143.503472222224144.3125-0.809027777777677-1.40347222222226
574145.44144.047916666674144.2-0.1520833333333941.35208333333230
584146.34145.555555555564145.21250.3430555555554650.744444444444525
594143.54148.405555555564147.78750.618055555555606-4.90555555555602
604149.24151.140972222224151.95-0.809027777777677-1.94097222222263
614158.94158.722916666674158.875-0.1520833333333940.17708333333303
624166.14169.318055555564168.9750.343055555555465-3.21805555555511
634179.14181.843055555564181.2250.618055555555606-2.74305555555566
644194.44194.540972222224195.35-0.809027777777677-0.140972222223354
654211.74209.810416666674209.9625-0.1520833333333941.88958333333267
664226.34223.543055555564223.20.3430555555554652.75694444444434
674235.84235.843055555564235.2250.618055555555606-0.043055555554929
684243.64246.778472222224247.5875-0.809027777777677-3.17847222222281
694258.74261.697916666674261.85-0.152083333333394-2.99791666666715
704278.24278.905555555564278.56250.343055555555465-0.705555555555293
7142984297.568055555564296.950.6180555555556060.431944444444525
724315.14315.315972222224316.125-0.809027777777677-0.215972222222263
734334.34335.197916666674335.35-0.152083333333394-0.897916666666788
7443564355.243055555554354.90.3430555555554650.756944444445253
754374NANA0.618055555555606NA
764395.5NANA-0.809027777777677NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/11c4w1244389547.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/11c4w1244389547.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/235e41244389547.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/235e41244389547.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/3munu1244389547.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/3munu1244389547.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/4vd2j1244389547.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t12443896843zgb4a0vcyrijy8/4vd2j1244389547.ps (open in new window)


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