Home » date » 2011 » Jan » 15 »

*Unverified author*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Sat, 15 Jan 2011 10:11:09 +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/Jan/15/t1295086537ucd98oe7vhmxrfa.htm/, Retrieved Sat, 15 Jan 2011 11:15:40 +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/2011/Jan/15/t1295086537ucd98oe7vhmxrfa.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W12
 
Dataseries X:
» Textbox « » Textfile « » CSV «
52347 52407 50570 50442 50590 50040 50476 50268 50595 48708 48547 48196 48375 47915 46462 46132 46308 46532 46817 46824 46263 45992 46404 46995 48102 48719 47912 48430 50141 50608 51005 51857 52513 52406 53634 55165 57294 58026 56701 58706 60103 61153 62395 63850 64534 65765 66954 65741 65474 60687 59227 59373 59995 59532 59696 59507 60210 58782 59372 58827 60481 59508 56565 56201 56193 56431 56316 55316 54795 53310 51848 50618 52026 50120 46825 46374 45441 45392 45032 44302 42880 42101 41886 41415 43228 41633 39375 38603 37847 36881 36700 36477 35684 35896 37109 37612 39570 39518 37970 38343 37966 38942 39304 39438 38999 38110 40024 41050 42239 42313 41159 42067 42515 43554 45018 45797 46749 47291 48800 50566 54884 54002 51813 52751 54461 55364 56900 57795
 
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.3055793.44370.000389
20.0930591.04870.148149
30.0992391.11840.13276
40.1399811.57750.058584
50.2464382.77720.003157
60.2592112.92120.002064
70.2209032.48950.007043
80.0838470.94490.17325
90.0597110.67290.251115
10-0.017302-0.1950.422858
110.1363771.53690.063404
120.4641465.23070
130.1224781.38030.084966
14-0.049741-0.56060.288045
15-0.035662-0.40190.344219
16-0.029052-0.32740.371954
170.1134521.27850.101695
180.1190731.34190.091013
190.0703890.79320.214559
20-0.046921-0.52880.298944
21-0.074571-0.84040.20114
22-0.149941-1.68970.046765
23-0.035201-0.39670.346127
240.2762713.11340.001143
25-0.055751-0.62830.265474
26-0.189836-2.13930.017161
27-0.145101-1.63520.052242
28-0.163738-1.84520.033666
29-0.036496-0.41130.340776
30-0.051913-0.5850.279783
31-0.088741-1.00010.159591
32-0.174139-1.96240.025949
33-0.185479-2.09020.019295
34-0.285866-3.22160.00081
35-0.149091-1.68020.047691
360.1638411.84640.033582
37-0.148025-1.66820.048874
38-0.191127-2.15390.016568
39-0.183064-2.0630.020574
40-0.14353-1.61750.054125
41-0.092199-1.0390.150382
42-0.064898-0.73140.232953
43-0.100089-1.12790.130735
44-0.2087-2.35190.010107
45-0.234394-2.64150.004646
46-0.309285-3.48550.000338
47-0.124959-1.40820.080754
480.1324491.49260.069008


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.3055793.44370.000389
2-0.000352-0.0040.498419
30.0782030.88130.189911
40.0976641.10060.136573
50.1933282.17870.0156
60.1475441.66270.049416
70.1131951.27560.102206
8-0.036497-0.41130.340772
9-0.006026-0.06790.472983
10-0.133719-1.50690.067156
110.0905591.02060.154704
120.3924794.4231e-05
13-0.160911-1.81340.036067
14-0.120828-1.36170.087858
15-0.035773-0.40310.343762
16-0.099661-1.12310.131751
170.0433020.4880.3132
18-0.020956-0.23620.406845
19-0.01821-0.20520.418868
20-0.040588-0.45740.324081
21-0.045422-0.51190.30481
22-0.076332-0.86020.195643
23-0.036099-0.40680.342416
240.165691.86720.032088
25-0.169203-1.90680.029402
26-0.082067-0.92480.178399
270.0194450.21910.41345
28-0.093091-1.04910.148067
29-0.023392-0.26360.396252
30-0.079394-0.89470.186313
31-0.048953-0.55170.291071
32-0.031422-0.35410.361922
33-0.038497-0.43380.332569
34-0.09648-1.08730.139487
35-0.002142-0.02410.490392
360.1280361.44290.075757
37-0.110294-1.24290.108088
380.072630.81850.207304
39-0.012507-0.14090.444069
400.0487330.54920.291919
41-0.091323-1.02920.152681
420.0005120.00580.497703
43-0.021837-0.24610.403005
44-0.123737-1.39440.082809
45-0.107029-1.20620.115001
46-0.072909-0.82160.206409
470.0416420.46930.319838
480.0391710.44140.329824
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/1yhjh1295086267.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/1yhjh1295086267.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/21whr1295086267.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/21whr1295086267.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/3ns981295086267.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295086537ucd98oe7vhmxrfa/3ns981295086267.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