Home » date » 2009 » Dec » 08 »

Opdracht 6 oefening 2 2

*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, 08 Dec 2009 11:29:38 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/08/t1260297104sw4t357h4nxehfc.htm/, Retrieved Tue, 08 Dec 2009 19:31:47 +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/2009/Dec/08/t1260297104sw4t357h4nxehfc.htm/},
    year = {2009},
}
@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 = {2009},
    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:
KDGP2W21
 
Dataseries X:
» Textbox « » Textfile « » CSV «
100.09 100.09 100.06 100.11 100.08 100.08 100.08 100.08 99.94 99.79 99.98 99.98 99.98 99.98 99.93 99.93 99.93 99.93 99.93 99.93 99.76 99.48 99.55 99.56 99.57 99.56 99.65 99.5 99.5 99.49 99.49 99.46 99.52 99.49 99.55 99.57 99.57 99.57 99.57 99.57 99.57 99.57 99.57 99.53 100.38 100.32 100.46 100.47 100.47 100.47 100.51 100.5 100.51 100.51 100.51 100.51 101.65 102.13 102.2 102.13 102.13 102.12 102.13 102.05 102 102.01 102.01 102.02 102.78 103.39 103.41 103.5 103.5 103.49 103.38 103.24 103.25 103.25 103.25 103.25 103.83 104.33 104.36 104.48 104.5 104.48 104.35 104.48 104.48 104.47 104.47 104.86 105.22 105.96 106.03 106.03
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Autocorrelation Function
Time lag kACF(k)T-STATP-value
10.2952272.87750.002475
20.0462410.45070.326614
3-0.0562-0.54780.292566
4-0.06093-0.59390.277004
5-0.146099-1.4240.078861
6-0.112935-1.10080.136892
7-0.119753-1.16720.123023
8-0.079271-0.77260.220826
9-0.051826-0.50510.307316
100.0533030.51950.302299
110.1857821.81080.036668
120.7051426.87290
130.3428643.34180.000596
14-0.020313-0.1980.421741
15-0.037338-0.36390.358361
16-0.063163-0.61560.269804
17-0.171377-1.67040.049069
18-0.120008-1.16970.122526
19-0.105351-1.02680.153553
20-0.066437-0.64750.259421
21-0.062863-0.61270.270766
220.0574320.55980.288473
230.0688030.67060.252049
240.3946313.84640.000108
250.2852932.78070.00327
26-0.050765-0.49480.310944
27-0.025911-0.25260.400581
28-0.071702-0.69890.243173
29-0.132717-1.29360.099476
30-0.109585-1.06810.14409
31-0.044347-0.43220.333274
32-0.063672-0.62060.268174
33-0.05967-0.58160.28111
340.0574860.56030.288296
35-0.000281-0.00270.498909
360.1221761.19080.118344
370.1929871.8810.031517
38-0.057734-0.56270.287476
39-0.038361-0.37390.354657
40-0.055383-0.53980.295297
41-0.060487-0.58960.278443
42-0.093634-0.91260.181873
43-0.007456-0.07270.471109
44-0.040111-0.3910.348352
45-0.022034-0.21480.415209
460.0374550.36510.357937
470.0024760.02410.490399
48-0.08976-0.87490.191925


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
10.2952272.87750.002475
2-0.044825-0.43690.331589
3-0.062821-0.61230.270899
4-0.026481-0.25810.398441
5-0.1309-1.27590.102558
6-0.040726-0.39690.346149
7-0.086209-0.84030.201436
8-0.043193-0.4210.337356
9-0.037294-0.36350.358521
100.052160.50840.306179
110.1463351.42630.07853
120.6763696.59240
130.0438580.42750.335001
14-0.19432-1.8940.030634
150.1042581.01620.156062
16-0.038877-0.37890.352796
17-0.087553-0.85340.197804
180.0523480.51020.305537
19-0.035349-0.34450.365603
200.0208210.20290.41981
21-0.011152-0.10870.456835
22-0.006335-0.06170.475447
23-0.130355-1.27050.103496
24-0.163493-1.59350.057181
25-0.036062-0.35150.363001
26-0.03142-0.30620.380044
270.0697340.67970.24918
28-0.079019-0.77020.221551
290.0865650.84370.20047
300.0392240.38230.351542
310.0316960.30890.379026
32-0.042296-0.41220.340543
33-0.007857-0.07660.469558
340.0419210.40860.341878
35-0.064556-0.62920.265358
36-0.107484-1.04760.148735
370.0327940.31960.374973
38-0.031731-0.30930.378896
39-0.008993-0.08770.46517
40-0.007002-0.06820.472866
410.0746260.72740.234395
42-0.08749-0.85270.197972
43-0.013273-0.12940.44867
440.0175860.17140.432135
450.054210.52840.299237
46-0.036133-0.35220.362742
470.0351050.34220.366493
48-0.088505-0.86260.195255
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/08/t1260297104sw4t357h4nxehfc/1y3gd1260296977.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/08/t1260297104sw4t357h4nxehfc/1y3gd1260296977.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/08/t1260297104sw4t357h4nxehfc/2yx5b1260296977.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/08/t1260297104sw4t357h4nxehfc/2yx5b1260296977.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 (par2 == 0) {
x <- log(x)
} else {
x <- (x ^ par2 - 1) / par2
}
if (par3 > 0) x <- diff(x,lag=1,difference=par3)
if (par4 > 0) x <- diff(x,lag=par5,difference=par4)
bitmap(file='pic1.png')
racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep=''))
dev.off()
bitmap(file='pic2.png')
rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF')
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