Home » date » 2007 » Nov » 28 » attachments

workshop 7 Q2 I

R Software Module: rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Wed, 28 Nov 2007 12:19:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Nov/28/t1196277026ombej7ii2xt5jrp.htm/, Retrieved Wed, 28 Nov 2007 20:10:29 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
93.5 94.7 112.9 99.2 105.6 113 83.1 81.1 96.9 104.3 97.7 102.6 89.9 96 112.7 107.1 106.2 121 101.2 83.2 105.1 113.3 99.1 100.3 93.5 98.8 106.2 98.3 102.1 117.1 101.5 80.5 105.9 109.5 97.2 114.5 93.5 100.9 121.1 116.5 109.3 118.1 108.3 105.4 116.2 111.2 105.8 122.7 99.5 107.9 124.6 115 110.3 132.7 99.7 96.5 118.7 112.9 130.5 137.9 115 116.8 140.9 120.7 134.2 147.3 112.4 107.1 128.4 137.7 135 151 137.4 132.4 161.3 139.8 146 154.6 142.1 120.5
 
Text written by user:
 
Output produced by software:


Summary of compuational 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
018.7750
10.3616263.17330.001083
2-0.274048-2.40480.990708
3-0.618236-5.4251
4-0.187875-1.64860.948348
50.201111.76470.040787
60.3141782.75690.003641
70.1534471.34650.091048
8-0.240869-2.11360.981107
9-0.462604-4.05930.999941
10-0.293262-2.57340.994004
110.2580922.26480.01317
120.5827955.1141e-06
130.2885162.53170.006694
14-0.157544-1.38240.914583
15-0.413523-3.62860.999745
16-0.172071-1.50990.932421
170.0635280.55750.289416
180.2487092.18240.016064
190.1311251.15060.126726
20-0.077698-0.68180.751293
21-0.259053-2.27320.987098
22-0.197917-1.73670.956781
230.1355461.18940.118966
240.3352252.94160.002156
250.2649992.32540.011344
26-0.122396-1.0740.856915
27-0.31249-2.74210.996206
28-0.21331-1.87180.967483
290.0752210.66010.255592
300.2121591.86170.033232
310.1322641.16060.124694
32-0.079994-0.70190.757584
33-0.230469-2.02240.976694
34-0.134912-1.18380.879943
350.1263271.10850.135545


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
00.3616263.17330.001083
1-0.465726-4.08670.999947
2-0.447427-3.92620.999907
30.2023291.77540.039889
4-0.091524-0.80310.78781
5-0.084582-0.74220.769889
60.2074781.82060.036275
7-0.381092-3.34410.999361
8-0.366948-3.220.999061
90.0594470.52160.301707
100.0722760.63420.263909
110.1080850.94840.172936
12-0.001617-0.01420.505642
130.1724471.51320.06716
14-0.070426-0.6180.730795
15-0.065732-0.57680.717121
16-0.071613-0.62840.734198
17-0.075556-0.6630.745345
18-0.060008-0.52660.699997
190.1057330.92780.178205
200.094210.82670.205484
21-0.039308-0.34490.634455
220.1284991.12760.1315
230.0572090.5020.308548
24-0.016353-0.14350.556864
25-0.149186-1.30910.902803
26-0.03266-0.28660.612402
270.009170.08050.468039
280.0243810.21390.415577
290.0238950.20970.417235
300.1255341.10160.137044
31-0.103003-0.90380.815552
32-0.078466-0.68850.753408
330.0900470.79020.21593
34-0.036504-0.32030.625204
35-0.037723-0.3310.629237
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/28/t1196277026ombej7ii2xt5jrp/1a6511196277594.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/28/t1196277026ombej7ii2xt5jrp/1a6511196277594.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/28/t1196277026ombej7ii2xt5jrp/2yp4t1196277594.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/28/t1196277026ombej7ii2xt5jrp/2yp4t1196277594.ps (open in new window)


 
Parameters:
par1 = 36 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 3 ;
 
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 (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='lags',ylab='ACF')
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 1:par1) {
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(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-1,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(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:

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