Home » date » 2011 » Apr » 11 »

*Unverified author*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Mon, 11 Apr 2011 13:41:35 +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/Apr/11/t130252908765b4y3lr53eslpb.htm/, Retrieved Mon, 11 Apr 2011 15:38:10 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W12
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12544 12264 13783 11214 11453 10883 10381 10348 10024 10805 10796 11907 12261 11377 12689 11474 10992 10764 12164 10409 10398 10349 10865 11630 12221 10884 12019 11021 10799 10423 10484 10450 9906 11049 11281 12485 12849 11380 12079 11366 11328 10444 10854 10434 10137 10992 10906 12367 14371 11695 11546 10922 10670 10254 10573 10239 10253 11176 10719 11817 12503 11510 12012 10941 11252 10662 11114 10415 10626 11411 10936 12513
 
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.4522053.83710.000132
20.3041422.58070.005949
3-0.042025-0.35660.361218
4-0.322357-2.73530.003921
5-0.443856-3.76620.000168
6-0.520568-4.41721.7e-05
7-0.424598-3.60280.000288
8-0.31801-2.69840.004337
90.0483520.41030.34141
100.2200541.86720.032971
110.3478952.9520.00213
120.6360585.39710
130.3306682.80580.003225
140.1897361.610.055891
15-0.096302-0.81710.208269
16-0.258116-2.19020.015875
17-0.349915-2.96910.002027
18-0.38444-3.26210.000846
19-0.347529-2.94890.002149
20-0.2147-1.82180.03632
210.0883030.74930.228067
220.29362.49130.007517
230.314832.67140.004667
240.4922574.17694.1e-05
250.195771.66120.050515
260.0785250.66630.253673
27-0.166841-1.41570.080589
28-0.29277-2.48420.007655
29-0.306065-2.5970.005697
30-0.297747-2.52650.00686
31-0.187124-1.58780.058357
32-0.146254-1.2410.109316
330.142921.21270.114601
340.2663262.25990.013428
350.2609672.21440.014985
360.360273.0570.001568
370.1406671.19360.118277
380.0524370.44490.328848
39-0.140219-1.18980.119017
40-0.218237-1.85180.034077
41-0.261614-2.21990.014789
42-0.221914-1.8830.03187
43-0.127047-1.0780.14231
44-0.062057-0.52660.300056
450.1209221.02610.15415
460.2482232.10620.019335
470.2254061.91260.029886
480.2433322.06470.021275


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.4522053.83710.000132
20.1252691.06290.14568
3-0.279656-2.3730.010159
4-0.345728-2.93360.002246
5-0.199462-1.69250.047438
6-0.224168-1.90210.030577
7-0.172621-1.46470.073673
8-0.232144-1.96980.026354
90.1132290.96080.169938
100.0208670.17710.42998
11-0.095917-0.81390.209197
120.4236823.59510.000295
13-0.150072-1.27340.103486
14-0.201645-1.7110.045692
15-0.040019-0.33960.367584
160.0790220.67050.252334
170.0408610.34670.364909
18-0.09702-0.82320.206546
19-0.137439-1.16620.123689
200.1001880.85010.199036
210.0062490.0530.478929
220.1433461.21630.113916
23-0.093186-0.79070.215854
240.0805630.68360.248212
25-0.153908-1.3060.097862
26-0.090615-0.76890.222234
270.0015640.01330.494724
280.0013930.01180.495302
290.0061750.05240.479178
30-0.022539-0.19130.424433
310.0315780.26790.394752
32-0.097735-0.82930.204836
33-0.051183-0.43430.332685
34-0.021749-0.18450.427051
35-0.050596-0.42930.334485
360.017010.14430.442819
370.0784890.6660.253769
38-0.056535-0.47970.316441
390.0021770.01850.492657
40-0.000157-0.00130.499469
410.0392990.33350.369878
42-0.028852-0.24480.403647
43-0.027492-0.23330.408103
440.0962530.81670.208388
45-0.077635-0.65880.256077
46-0.000875-0.00740.497048
470.0640890.54380.294124
48-0.02604-0.2210.412876
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/1i2j71302529293.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/1i2j71302529293.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/25tro1302529293.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/25tro1302529293.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/3cegk1302529293.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/11/t130252908765b4y3lr53eslpb/3cegk1302529293.ps (open in new window)


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