Home » date » 2007 » Dec » 06 » attachments

workshop 5

R Software Module: rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Thu, 06 Dec 2007 06:43:04 -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/Dec/06/t1196947936tr0npjozpkgftu7.htm/, Retrieved Thu, 06 Dec 2007 14:32:18 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2.4 -0.9 -2.0 6.0 -2.8 -0.2 8.2 1.6 0.3 7.5 2.7 7.3 6.7 0.5 6.2 4.6 2.4 0.5 -4.9 -1.6 0.5 3.2 -6.5 -1.8 -1.2 -3.7 5.6 2.0 4.4 5.8 10.1 0.7 12.7 1.6 5.8 6.0 2.1 11.1 2.8 -0.6 6.5 3.8 3.3 5.9 -0.3 3.0 6.8 3.4 -3.0
 
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
016.08280
10.2324051.41370.082909
20.3915852.38190.011239
30.3289192.00070.026399
40.1376070.8370.203975
50.1150170.69960.24427
60.0454950.27670.391761
7-0.219014-1.33220.904531
8-0.239125-1.45450.922886
9-0.21982-1.33710.905325
10-0.406818-2.47460.990976
11-0.273722-1.6650.947819
12-0.454395-2.7640.995576
13-0.23437-1.42560.918819
14-0.273877-1.66590.947914
15-0.085886-0.52240.697755
16-0.061068-0.37150.643794
17-0.014105-0.08580.533955
180.0573380.34880.364617
19-0.054463-0.33130.628851
200.1942871.18180.122412
210.1629090.99090.164077
220.0756230.460.324106
230.167381.01810.157613
240.0911490.55440.291308
250.0417080.25370.400565
260.1219950.74210.231365
270.007050.04290.483013
28-0.070866-0.43110.665538
290.0630530.38350.351759
30-0.031626-0.19240.575748
31-0.002295-0.0140.505533
32-0.039331-0.23920.59388
33-0.005072-0.03090.512223
34-0.025084-0.15260.560221
35-0.010092-0.06140.524311
36-0.01249-0.0760.530075
37NANANA
38NANANA
39NANANA
40NANANA
41NANANA
42NANANA
43NANANA
44NANANA
45NANANA
46NANANA
47NANANA


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
00.2324051.41370.082909
10.3568472.17060.018225
20.2270731.38120.087746
3-0.081898-0.49820.689343
4-0.107944-0.65660.742248
5-0.065682-0.39950.654099
6-0.30463-1.8530.964064
7-0.281535-1.71250.952414
8-0.038918-0.23670.592914
9-0.14218-0.86480.803652
10-0.022317-0.13580.553623
11-0.224058-1.36290.909422
120.091740.5580.290092
13-0.013481-0.0820.532457
140.1230270.74830.229492
150.0656150.39910.346049
16-0.046041-0.28010.609504
17-0.095627-0.58170.717844
18-0.426195-2.59240.993217
19-0.080022-0.48680.685347
200.0939390.57140.285589
21-0.118059-0.71810.761406
220.0510150.31030.379034
23-0.060754-0.36960.643089
240.0417620.2540.400441
25-0.084898-0.51640.695681
26-0.005544-0.03370.513361
27-0.043299-0.26340.603139
28-0.06308-0.38370.648302
29-0.013696-0.08330.532972
30-0.169403-1.03040.845253
31-0.098559-0.59950.723757
320.0446620.27170.393693
330.0299630.18230.428189
340.0533430.32450.373705
35-0.13894-0.84510.798268
36NANANA
37NANANA
38NANANA
39NANANA
40NANANA
41NANANA
42NANANA
43NANANA
44NANANA
45NANANA
46NANANA
47NANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196947936tr0npjozpkgftu7/1eir21196948582.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196947936tr0npjozpkgftu7/1eir21196948582.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196947936tr0npjozpkgftu7/2a8x71196948582.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196947936tr0npjozpkgftu7/2a8x71196948582.ps (open in new window)


 
Parameters:
par1 = 48 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ;
 
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