Home » date » 2011 » Apr » 12 »

*Unverified author*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Tue, 12 Apr 2011 14:50:14 +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/12/t1302619630rn6h668h5rc7f0j.htm/, Retrieved Tue, 12 Apr 2011 16:47:13 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W12
 
Dataseries X:
» Textbox « » Textfile « » CSV «
116 111 104 100 93 91 119 139 134 124 113 109 109 106 101 98 93 91 122 139 140 132 117 114 113 110 107 103 98 98 137 148 147 139 130 128 127 123 118 114 108 111 151 159 158 148 138 137 136 133 126 120 114 116 153 162 161 149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135 124 118 121 121 118 113 107 100 102 130 136 133 120 112 109 110
 
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.7965099.18580
20.4554655.25270
30.1775742.04790.02127
40.0428570.49430.310972
50.0291340.3360.368703
60.0383610.44240.32946
70.0321920.37130.355519
80.0351730.40560.342832
90.1413081.62960.052771
100.3697574.26421.9e-05
110.6541017.54350
120.8068789.30540
130.6002286.92220
140.2808623.23910.000757
150.0170580.19670.422175
16-0.115891-1.33650.09183
17-0.138836-1.60110.055859
18-0.142176-1.63970.05172
19-0.154816-1.78540.038236
20-0.152619-1.76010.040346
21-0.05261-0.60670.272534
220.157691.81860.035614
230.4124384.75653e-06
240.5380186.20470
250.3419813.94396.5e-05
260.0558180.64370.26043
27-0.176199-2.0320.022071
28-0.288904-3.33180.000559
29-0.307875-3.55060.000266
30-0.309688-3.57150.000247
31-0.317049-3.65640.000184
32-0.310877-3.58520.000236
33-0.213716-2.46470.007494
34-0.01852-0.21360.415599
350.2135512.46280.007532
360.3233413.7290.000142
370.1491031.71950.043921
38-0.101382-1.16920.122207
39-0.301051-3.47190.000349
40-0.389692-4.49418e-06
41-0.397343-4.58245e-06
42-0.389058-4.48688e-06
43-0.388513-4.48058e-06
44-0.377763-4.35661.3e-05
45-0.28484-3.28490.000652
46-0.107855-1.24380.107872
470.0986851.13810.128564
480.1985032.28920.01182


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.7965099.18580
2-0.489533-5.64560
30.0975481.1250.131311
40.0787420.90810.182736
50.0464190.53530.296657
6-0.09133-1.05330.147063
70.0221110.2550.39956
80.0870741.00420.158556
90.3372233.8897.9e-05
100.3414163.93746.6e-05
110.445165.13380
120.1380751.59240.056839
13-0.731225-8.43290
140.347944.01265e-05
15-0.224709-2.59150.005312
16-0.159998-1.84520.033618
17-0.148528-1.71290.04453
18-0.17798-2.05260.021038
190.0010830.01250.495028
20-0.023362-0.26940.39401
21-0.077732-0.89640.185817
220.0476170.54910.291915
23-0.08211-0.94690.172693
240.0648240.74760.228015
25-0.031313-0.36110.359294
260.0537790.62020.268091
270.060490.69760.24332
28-0.055258-0.63730.262522
29-0.023536-0.27140.393239
300.0837340.96570.167982
31-0.077806-0.89730.185589
32-0.0544-0.62740.265745
33-0.034508-0.3980.345647
34-0.089491-1.03210.151959
350.004890.05640.477555
36-0.044657-0.5150.3037
37-0.023361-0.26940.394016
38-0.093497-1.07830.141434
390.0239420.27610.391444
400.0363180.41880.338006
41-0.024276-0.280.389968
420.030010.34610.364912
43-0.062786-0.72410.235144
440.0120860.13940.444678
45-0.01575-0.18160.428072
46-0.083635-0.96450.168268
47-0.033199-0.38290.351213
480.0468160.53990.295081
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/1t0uw1302619812.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/1t0uw1302619812.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/2s13c1302619812.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/2s13c1302619812.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/3sge61302619812.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/12/t1302619630rn6h668h5rc7f0j/3sge61302619812.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