Home » date » 2010 » Jan » 12 »

Opgave 9 Oefening 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 12 Jan 2010 11:59:49 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg.htm/, Retrieved Tue, 12 Jan 2010 20:00:55 +0100
 
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/Jan/12/t1263322849q9zcxpwj8ob0vcg.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10,1200 10,1200 10,0500 10,1400 10,1700 10,2000 10,2000 10,3500 10,4300 10,5200 10,5700 10,5700 10,5700 10,6500 10,5700 10,6100 10,6300 10,7100 10,7200 10,7700 10,7900 10,8200 10,9000 10,8300 10,9200 10,9100 10,8800 10,8700 11,0000 10,9900 11,0300 11,0400 10,9900 10,9000 11,0000 10,9900 10,9200 10,9800 11,1500 11,1900 11,3300 11,3800 11,4000 11,4500 11,5600 11,6100 11,8200 11,7700 11,8500 11,8200 11,9200 11,8600 11,8700 11,9400 11,8600 11,9200 11,8300 11,9100 11,9300 11,9900 11,9600 12,1200 11,8500 12,0100 12,1000 12,2100 12,3100 12,3100 12,3900 12,3500 12,4100 12,5100
 
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
110.12NANA-0.00968750000000013NA
210.12NANA0.00839583333333345NA
310.05NANA-0.0462708333333329NA
410.14NANA-0.043854166666667NA
510.17NANA0.00356249999999919NA
610.2NANA0.032062500000001NA
710.210.286812510.3054166666667-0.0186041666666669-0.0868125000000024
810.3510.359645833333310.346250.0133958333333328-0.00964583333333202
910.4310.385729166666710.39-0.004270833333333060.0442708333333321
1010.5210.428395833333310.43125-0.002854166666666260.0916041666666665
1110.5710.527479166666710.470.05747916666666660.0425208333333327
1210.5710.521062510.51041666666670.01064583333333320.0489374999999992
1310.5710.543645833333310.5533333333333-0.009687500000000130.0263541666666658
1410.6510.600895833333310.59250.008395833333333450.0491041666666678
1510.5710.578729166666710.625-0.0462708333333329-0.0087291666666669
1610.6110.608645833333310.6525-0.0438541666666670.00135416666666721
1710.6310.682312510.678750.00356249999999919-0.0523124999999993
1810.7110.735395833333310.70333333333330.032062500000001-0.0253958333333326
1910.7210.710145833333310.72875-0.01860416666666690.00985416666666872
2010.7710.767562510.75416666666670.01339583333333280.00243749999999920
2110.7910.773645833333310.7779166666667-0.004270833333333060.016354166666666
2210.8210.798812510.8016666666667-0.002854166666666260.0211874999999999
2310.910.885395833333310.82791666666670.05747916666666660.0146041666666683
2410.8310.865645833333310.8550.0106458333333332-0.0356458333333336
2510.9210.869895833333310.8795833333333-0.009687500000000130.0501041666666655
2610.9110.912145833333310.903750.00839583333333345-0.00214583333333351
2710.8810.877062510.9233333333333-0.04627083333333290.00293749999999982
2810.8710.891145833333310.935-0.043854166666667-0.0211458333333319
291110.946062510.94250.003562499999999190.0539375
3010.9910.985395833333310.95333333333330.0320625000000010.00460416666666852
3111.0310.941395833333310.96-0.01860416666666690.0886041666666664
3211.0410.976312510.96291666666670.01339583333333280.0636875000000003
3310.9910.972812510.9770833333333-0.004270833333333060.0171875000000004
3410.910.998812511.0016666666667-0.00285416666666626-0.098812500000001
351111.086229166666711.028750.0574791666666666-0.0862291666666675
3610.9911.069395833333311.058750.0106458333333332-0.0793958333333329
3710.9211.080729166666711.0904166666667-0.00968750000000013-0.160729166666666
3810.9811.131312511.12291666666670.00839583333333345-0.151312500000001
3911.1511.117479166666711.16375-0.04627083333333290.0325208333333347
4011.1911.173229166666711.2170833333333-0.0438541666666670.0167708333333341
4111.3311.284395833333311.28083333333330.003562499999999190.0456041666666671
4211.3811.379562511.34750.0320625000000010.000437500000000313
4311.411.400145833333311.41875-0.0186041666666669-0.000145833333334622
4411.4511.505895833333311.49250.0133958333333328-0.0558958333333326
4511.5611.555312511.5595833333333-0.004270833333333060.00468749999999929
4611.6111.616729166666711.6195833333333-0.00285416666666626-0.00672916666666978
4711.8211.727479166666711.670.05747916666666660.0925208333333316
4811.7711.726479166666711.71583333333330.01064583333333320.0435208333333357
4911.8511.748645833333311.7583333333333-0.009687500000000130.101354166666669
5011.8211.805479166666711.79708333333330.008395833333333450.0145208333333358
5111.9211.781645833333311.8279166666667-0.04627083333333290.138354166666666
5211.8611.807812511.8516666666667-0.0438541666666670.0521875000000005
5311.8711.872312511.868750.00356249999999919-0.00231250000000038
5411.9411.914562511.88250.0320625000000010.0254374999999989
5511.8611.877645833333311.89625-0.0186041666666669-0.0176458333333347
5611.9211.926729166666711.91333333333330.0133958333333328-0.00672916666666445
5711.8311.918645833333311.9229166666667-0.00427083333333306-0.0886458333333309
5811.9111.923395833333311.92625-0.00285416666666626-0.0133958333333322
5911.9311.999562511.94208333333330.0574791666666666-0.0695625
6011.9911.973562511.96291666666670.01064583333333320.0164374999999986
6111.9611.983229166666711.9929166666667-0.00968750000000013-0.0232291666666669
6212.1212.036312512.02791666666670.008395833333333450.0836874999999999
6311.8512.021229166666712.0675-0.0462708333333329-0.171229166666667
6412.0112.065312512.1091666666667-0.043854166666667-0.0553124999999994
6512.112.151062512.14750.00356249999999919-0.0510625000000005
6612.2112.221229166666712.18916666666670.032062500000001-0.0112291666666646
6712.31NANA-0.0186041666666669NA
6812.31NANA0.0133958333333328NA
6912.39NANA-0.00427083333333306NA
7012.35NANA-0.00285416666666626NA
7112.41NANA0.0574791666666666NA
7212.51NANA0.0106458333333332NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/166xs1263322786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/166xs1263322786.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/2iwr21263322786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/2iwr21263322786.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/3bmmp1263322786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/3bmmp1263322786.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/4m8m31263322786.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263322849q9zcxpwj8ob0vcg/4m8m31263322786.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