Home » date » 2011 » May » 19 »

opgave 6 bis oefening 2

*Unverified author*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Thu, 19 May 2011 11:03:57 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4.htm/, Retrieved Thu, 19 May 2011 13:01:17 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W12
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10407 10463 10556 10646 10702 11353 11346 11451 11964 12574 13031 13812 14544 14931 14886 16005 17064 15168 16050 15839 15137 14954 15648 15305 15579 16348 15928 16171 15937 15713 15594 15683 16438 17032 17696 17745 19394 20148 20108 18584 18441 18391 19178 18079 18483 19644 19195 19650 20830 23595 22937 21814 21928 21777 21383 21467 22052 22680 24320 24977 25204 25739 26434 27525 30695 32436 30160 30236 31293 31077 32226 33865 32810
 
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' @ www.wessa.org


Autocorrelation Function
Time lag kACF(k)T-STATP-value
10.0606540.51470.304181
2-0.232376-1.97180.026239
30.0751130.63740.262958
40.0104140.08840.464916
5-0.1596-1.35420.089946
60.0787190.6680.25315
70.0554780.47070.319624
8-0.150154-1.27410.103363
90.0032690.02770.488975
10-0.096901-0.82220.206829
110.0291590.24740.402641
120.1070620.90840.183336
130.0731310.62050.268431
14-0.083819-0.71120.239619
150.1353821.14880.12723
160.1440741.22250.112752
17-0.153954-1.30630.097797
18-0.118267-1.00350.159484
19-0.078436-0.66560.253912
200.0140480.11920.452722
21-0.047931-0.40670.342714
220.159931.3570.089503
230.0450680.38240.351641
24-0.053012-0.44980.327094
25-0.111169-0.94330.17434
260.0860860.73050.233738
270.0863710.73290.233005
28-0.040758-0.34580.365236
29-0.001196-0.01010.495967
30-0.092268-0.78290.218121
310.0118360.10040.460141
32-0.108607-0.92160.179917
330.0911570.77350.220883
340.0611160.51860.30282
35-0.081179-0.68880.246572
36-0.038435-0.32610.372635
370.0684390.58070.281619
38-0.031529-0.26750.394914
39-0.032526-0.2760.391671
400.0279760.23740.406518
41-0.115832-0.98290.164481
42-0.054063-0.45870.323903
430.015350.13030.448365
44-0.083303-0.70690.24097
45-0.063591-0.53960.295574
460.0762040.64660.25997
47-0.070405-0.59740.276054
48-0.040872-0.34680.364873


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.0606540.51470.304181
2-0.236926-2.01040.024068
30.1136940.96470.168955
4-0.065909-0.55930.288862
5-0.118056-1.00170.159912
60.0939790.79740.213909
7-0.028848-0.24480.403659
8-0.099318-0.84270.201081
90.0235690.20.421025
10-0.200732-1.70330.046415
110.1264161.07270.143499
120.0185960.15780.437531
130.0732310.62140.268153
14-0.052423-0.44480.328892
150.1565751.32860.09409
160.1057040.89690.186374
17-0.099418-0.84360.200847
18-0.101546-0.86160.195871
19-0.159736-1.35540.089762
200.0570740.48430.314825
21-0.048129-0.40840.342101
220.1685591.43030.078483
230.023330.1980.421815
240.0084550.07170.471503
25-0.101484-0.86110.196014
260.0951150.80710.211139
27-0.04311-0.36580.357793
28-0.045919-0.38960.348977
29-0.04104-0.34820.364339
30-0.054717-0.46430.32192
310.0687250.58310.280807
32-0.111714-0.94790.173168
330.1796031.5240.065947
340.0146890.12460.450576
35-0.116115-0.98530.163895
360.0069430.05890.476591
37-0.052182-0.44280.329626
38-0.114498-0.97150.167265
390.0407170.34550.365363
40-0.050388-0.42760.335125
410.0308860.26210.397004
42-0.143598-1.21850.113511
430.0515590.43750.331532
44-0.174423-1.480.071614
450.0141830.12030.452273
46-0.060638-0.51450.30423
47-0.058837-0.49920.309564
48-0.005075-0.04310.482884
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/1xw6w1305803035.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/1xw6w1305803035.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/29g291305803035.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/29g291305803035.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/3hy7p1305803035.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t13058028751qgxwux5qaop2w4/3hy7p1305803035.ps (open in new window)


 
Parameters (Session):
par1 = 48 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
Parameters (R input):
par1 = 48 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
R code (references can be found in the software module):
if (par1 == 'Default') {
par1 = 10*log10(length(x))
} else {
par1 <- as.numeric(par1)
}
par2 <- as.numeric(par2)
par3 <- as.numeric(par3)
par4 <- as.numeric(par4)
par5 <- as.numeric(par5)
if (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma'
par7 <- as.numeric(par7)
if (par8 != '') par8 <- as.numeric(par8)
ox <- x
if (par8 == '') {
if (par2 == 0) {
x <- log(x)
} else {
x <- (x ^ par2 - 1) / par2
}
} else {
x <- log(x,base=par8)
}
if (par3 > 0) x <- diff(x,lag=1,difference=par3)
if (par4 > 0) x <- diff(x,lag=par5,difference=par4)
bitmap(file='picts.png')
op <- par(mfrow=c(2,1))
plot(ox,type='l',main='Original Time Series',xlab='time',ylab='value')
if (par8=='') {
mytitle <- paste('Working Time Series (lambda=',par2,', d=',par3,', D=',par4,')',sep='')
mysub <- paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')
} else {
mytitle <- paste('Working Time Series (base=',par8,', d=',par3,', D=',par4,')',sep='')
mysub <- paste('(base=',par8,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')
}
plot(x,type='l', main=mytitle,xlab='time',ylab='value')
par(op)
dev.off()
bitmap(file='pic1.png')
racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=mysub)
dev.off()
bitmap(file='pic2.png')
rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF',sub=mysub)
dev.off()
(myacf <- c(racf$acf))
(mypacf <- c(rpacf$acf))
lengthx <- length(x)
sqrtn <- sqrt(lengthx)
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Autocorrelation Function',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Time lag k',header=TRUE)
a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','ACF(k)','click here for more information about the Autocorrelation Function'),header=TRUE)
a<-table.element(a,'T-STAT',header=TRUE)
a<-table.element(a,'P-value',header=TRUE)
a<-table.row.end(a)
for (i in 2:(par1+1)) {
a<-table.row.start(a)
a<-table.element(a,i-1,header=TRUE)
a<-table.element(a,round(myacf[i],6))
mytstat <- myacf[i]*sqrtn
a<-table.element(a,round(mytstat,4))
a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Partial Autocorrelation Function',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Time lag k',header=TRUE)
a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','PACF(k)','click here for more information about the Partial Autocorrelation Function'),header=TRUE)
a<-table.element(a,'T-STAT',header=TRUE)
a<-table.element(a,'P-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:par1) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,round(mypacf[i],6))
mytstat <- mypacf[i]*sqrtn
a<-table.element(a,round(mytstat,4))
a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.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