Home » date » 2011 » May » 19 »

opgave 6 bis oefening 1

*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 10:58:24 +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/t1305802612hwito8ra9lby3g3.htm/, Retrieved Thu, 19 May 2011 12:56:55 +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 time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Autocorrelation Function
Time lag kACF(k)T-STATP-value
10.9410258.04010
20.8731387.46010
30.8158436.97060
40.7605156.49780
50.7016325.99470
60.6515.56210
70.5967685.09881e-06
80.5279664.51091.2e-05
90.4700414.0167.1e-05
100.4275473.6530.000242
110.3923.34920.000642
120.3600453.07620.001475
130.3292462.81310.00315
140.2977152.54370.006543
150.2694252.3020.012096
160.2487172.1250.018484
170.2304131.96870.026395
180.2107241.80040.037962
190.1954841.67020.04958
200.1779091.52010.066409
210.1555741.32920.093956
220.1326831.13360.130327
230.1016430.86840.194
240.0636050.54340.294242
250.0396540.33880.367865
260.0249990.21360.415732
270.0081690.06980.472272
28-0.013192-0.11270.455285
29-0.03005-0.25670.399049
30-0.04691-0.40080.344869
31-0.069101-0.59040.278373
32-0.088786-0.75860.225272
33-0.1054-0.90050.185398
34-0.124008-1.05950.146428
35-0.150666-1.28730.10103
36-0.177194-1.51390.067178
37-0.195188-1.66770.049832
38-0.205104-1.75240.041951
39-0.215324-1.83970.034937
40-0.227725-1.94570.027772
41-0.239429-2.04570.022195
42-0.246349-2.10480.019375
43-0.250255-2.13820.017925
44-0.259843-2.22010.014758
45-0.268773-2.29640.012262
46-0.27499-2.34950.010753
47-0.284275-2.42890.008805
48-0.293983-2.51180.007112


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.9410258.04010
2-0.108232-0.92470.179076
30.062930.53770.296218
4-0.029086-0.24850.402217
5-0.056196-0.48010.316283
60.0452770.38680.349998
7-0.080791-0.69030.246105
8-0.145281-1.24130.109237
90.0712460.60870.272297
100.0570740.48760.313634
110.0323820.27670.391407
120.020040.17120.432262
13-0.032611-0.27860.390659
14-0.011892-0.10160.459675
150.0241550.20640.418533
160.0125920.10760.457311
17-0.018453-0.15770.437578
18-0.022058-0.18850.425518
190.034270.29280.385253
20-0.028664-0.24490.403609
21-0.039415-0.33680.36863
22-0.028681-0.2450.403553
23-0.113302-0.96810.168107
24-0.060701-0.51860.302795
250.1119040.95610.171087
260.0243820.20830.417781
27-0.012029-0.10280.459212
28-0.041087-0.3510.363281
290.0073210.06260.475146
300.0007380.00630.497492
31-0.071583-0.61160.271351
32-0.057679-0.49280.311814
33-0.022515-0.19240.423995
34-0.009237-0.07890.468657
35-0.065524-0.55980.288653
36-0.034126-0.29160.38572
370.0361370.30880.379193
380.0424630.36280.358901
39-0.031199-0.26660.395279
40-0.033093-0.28280.389084
41-0.015428-0.13180.447747
420.0281140.24020.405421
430.0125040.10680.457607
44-0.101086-0.86370.195297
45-0.025355-0.21660.414551
460.0115320.09850.46089
47-0.049646-0.42420.336342
48-0.033035-0.28220.389276
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/1y9jb1305802701.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/1y9jb1305802701.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/2n9h21305802701.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/2n9h21305802701.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/38j7q1305802701.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305802612hwito8ra9lby3g3/38j7q1305802701.ps (open in new window)


 
Parameters (Session):
par1 = 48 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
Parameters (R input):
par1 = 48 ; par2 = 1 ; par3 = 0 ; 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