Home » date » 2010 » Dec » 17 »

Autocorrelation function

*The author of this computation has been verified*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Fri, 17 Dec 2010 09:14:56 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69.htm/, Retrieved Fri, 17 Dec 2010 10:15:51 +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/Dec/17/t1292577350xk5jdqagsdg8s69.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
15561600 14917500 14805920 16958000 17605000 17131200 18474600 17286700 18574400 18056000 19701600 19061700 19681900 34521200 19922700 20177900 19759900 23076700 22532000 22029400 22587000 23256600 22680300 21916400 19640200 18813100 18730000 18154700 17848800 18077500 17133100 16602600 15878900 15789100 15422000 14661400 15879200 14339300 13169600 14528900 13375800 12309900 11933900 10061900 12609600 11156500 12187200 11284300 10177000 10970720 10820680 11492390 14573750 13992820 14727070 15685360 16736210 17950180 17002730 17415160 17929810 17865790 19202360 19085000 18188880 18466410 18520400 20025500 20636100 20672000 22589100 21864800 22750100 22548746 21325495 21556563 21415269 20401054 19062253 19085706 19279967 18552045 17800733 17142490 17593173 17633859 17336613 17008347 17951965 14520929 16941217 15436824 14744261 14248004 11540953 12881661 15185757 13554339 13575106 12238400 13303614 14151478 1417 etc...
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Autocorrelation Function
Time lag kACF(k)T-STATP-value
10.7993848.15210
20.7659617.81130
30.7280867.4250
40.694047.07790
50.6504426.63320
60.5628645.74010
70.5123075.22450
80.4481214.577e-06
90.3690243.76330.000139
100.2894662.9520.001951
110.1757411.79220.038003
120.0940560.95920.169844
130.0374550.3820.351632
14-0.022781-0.23230.408372
15-0.091401-0.93210.176719
16-0.148754-1.5170.06615
17-0.228459-2.32980.010873
18-0.293571-2.99380.001721
19-0.369403-3.76720.000137
20-0.427777-4.36251.5e-05
21-0.481143-4.90672e-06
22-0.530552-5.41060
23-0.537246-5.47890
24-0.578126-5.89580
25-0.607629-6.19660
26-0.599312-6.11180
27-0.612007-6.24130
28-0.604572-6.16540
29-0.586229-5.97840
30-0.578038-5.89490
31-0.511942-5.22080
32-0.48741-4.97061e-06
33-0.424921-4.33341.7e-05
34-0.379785-3.87319.4e-05
35-0.346214-3.53070.00031
36-0.28777-2.93470.002055
37-0.252493-2.57490.005716
38-0.192478-1.96290.026164
39-0.109653-1.11820.133019
40-0.063962-0.65230.257829
41-0.005959-0.06080.47583
420.0446990.45580.324728
430.0995171.01490.15626
440.1607111.63890.052124
450.1856171.89290.030573
460.2352892.39950.009099
470.2712882.76660.003353
480.3033873.0940.001269


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.7993848.15210
20.3516673.58630.000256
30.1580451.61170.055024
40.0784650.80020.212713
50.0031220.03180.487329
6-0.16873-1.72070.044138
7-0.072524-0.73960.230604
8-0.077953-0.7950.214221
9-0.122396-1.24820.107381
10-0.112758-1.14990.12641
11-0.212677-2.16890.016185
12-0.139789-1.42560.078494
130.0042610.04350.482711
140.0406930.4150.339504
150.0108690.11080.455977
160.0368870.37620.353776
17-0.101487-1.0350.151541
18-0.112032-1.14250.127934
19-0.142544-1.45370.074524
20-0.112383-1.14610.127194
21-0.101137-1.03140.152374
22-0.098355-1.0030.159087
230.0290770.29650.383709
24-0.039665-0.40450.343336
25-0.037103-0.37840.352962
260.0947410.96620.1681
270.0306010.31210.377805
280.0083210.08490.466268
290.0281740.28730.387221
30-0.102598-1.04630.148923
310.0412540.42070.337419
32-0.043276-0.44130.329945
330.0295080.30090.382036
340.0221180.22560.410992
35-0.044314-0.45190.326135
36-0.042944-0.43790.331168
37-0.075098-0.76590.222749
38-0.022132-0.22570.410938
390.0964050.98310.16391
400.0083470.08510.466164
41-0.022566-0.23010.40922
42-0.021379-0.2180.413919
43-0.027826-0.28380.388576
440.0397170.4050.343141
45-0.032658-0.3330.369886
46-0.013241-0.1350.446425
47-0.067089-0.68420.247694
48-0.072292-0.73720.23132
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/1h60y1292577292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/1h60y1292577292.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/2sxi01292577292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/2sxi01292577292.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/3sxi01292577292.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292577350xk5jdqagsdg8s69/3sxi01292577292.ps (open in new window)


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