Home » date » 2011 » Apr » 03 »

marina cabraja: opgave 6bis: koffie, thee en cacao: autocorrelatie

*Unverified author*
R Software Module: /rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Sun, 03 Apr 2011 16:11:32 +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/03/t13018469967o9nz4c24l3i7fa.htm/, Retrieved Sun, 03 Apr 2011 18:09:59 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W12
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106,42 106,22 106,32 105,81 105,92 107,54 107,34 107,24 107,74 105,71 105,41 106,22 106,32 106,12 106,22 105,92 105,71 105,71 105,92 105,71 105,41 104,49 101,35 99,72 99,01 97,89 95,86 94,95 95,35 95,15 95,46 95,56 95,05 94,64 93,63 93,12 93,53 97,18 96,27 95,15 97,08 101,95 103,07 103,68 102,87 102,56 103,38 103,27 102,89 102,69 101,54 102,9 101,53 101,96 101,99 101,11 101,75 101,71 104,11 103,57 103,32 103,64 103,68 103,79 103,01 101,54 101,9 103,68 104,62 104,11 105,04 104,83 105,05 104,68 107,32 109,9 109,77 110,69 110,54 110,89 110,95 109,73 110,85 110,39 110,58 110,4 111,07 110,86 111,38 111,44 110,36 110,06 108,34 107,94 107,39 107,1 107,61 107,74 106,9 106,71 106,6 108,21 110,54 110,91 109,51 110,27 111,39 112,13 111,64
 
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.96426810.06730
20.9156899.56010
30.8705029.08830
40.8278838.64340
50.779418.13730
60.7170317.4860
70.6561256.85010
80.6022186.28730
90.5552975.79750
100.5105155.32990
110.4654984.85992e-06
120.4220014.40581.2e-05
130.3763533.92927.5e-05
140.3320383.46660.000378
150.290453.03240.001516
160.2600912.71540.003849
170.2275542.37570.00963
180.188121.9640.026037
190.1565721.63470.052503
200.1288661.34540.090645
210.1078121.12560.131405
220.0854460.89210.187157
230.068660.71680.237506
240.057460.59990.274909
250.0504080.52630.299882
260.0460210.48050.315927
270.0331320.34590.365038
280.0200620.20950.417242
290.0036770.03840.484725
30-0.015065-0.15730.437656
31-0.03705-0.38680.349823
32-0.061559-0.64270.260885
33-0.081288-0.84870.198962
34-0.108189-1.12950.130577
35-0.129563-1.35270.08948
36-0.147653-1.54150.063042
37-0.164274-1.71510.044587
38-0.183961-1.92060.028697
39-0.208232-2.1740.015934
40-0.231231-2.41410.00872
41-0.256343-2.67630.004297
42-0.279313-2.91610.002152
43-0.296936-3.10010.001231
44-0.316581-3.30520.000643
45-0.337908-3.52790.000307
46-0.361505-3.77420.000131
47-0.384412-4.01345.5e-05
48-0.40603-4.23912.4e-05


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.96426810.06730
2-0.201247-2.10110.01897
30.0578060.60350.273711
4-0.010652-0.11120.455828
5-0.116243-1.21360.113759
6-0.199547-2.08330.01978
70.0455490.47550.317674
80.0247930.25880.398121
90.0428310.44720.327819
100.0090180.09420.462581
11-0.002612-0.02730.489149
12-0.03262-0.34060.367046
13-0.105702-1.10360.136107
14-0.022209-0.23190.408537
15-0.002105-0.0220.491254
160.14191.48150.070682
17-0.103958-1.08540.14008
18-0.074242-0.77510.219977
190.1145261.19570.117206
20-0.06713-0.70090.242443
210.0174560.18220.427863
22-0.017215-0.17970.428848
230.1244871.29970.098226
24-0.01693-0.17680.430015
250.0256890.26820.394524
26-0.006702-0.070.472173
27-0.145619-1.52030.065665
28-0.018351-0.19160.42421
29-0.09841-1.02740.153245
30-0.015401-0.16080.436278
31-0.029411-0.30710.379692
32-0.002296-0.0240.49046
330.0295410.30840.379175
34-0.113121-1.1810.120083
350.0926590.96740.167747
36-0.047382-0.49470.310911
37-0.010718-0.11190.455555
38-0.087843-0.91710.180557
39-0.019893-0.20770.417928
40-0.058725-0.61310.27054
41-0.068957-0.71990.236554
42-0.010823-0.1130.455121
430.1083491.13120.130228
44-0.064257-0.67090.251864
45-0.079411-0.82910.204437
46-0.029204-0.30490.380512
47-0.085847-0.89630.186043
48-0.030681-0.32030.37467
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/1jw5x1301847090.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/1jw5x1301847090.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/29xve1301847090.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/29xve1301847090.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/32do31301847090.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Apr/03/t13018469967o9nz4c24l3i7fa/32do31301847090.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