Home » date » 2007 » Nov » 30 » attachments

Workshop 8, question 1

R Software Module: rwasp_autocorrelation.wasp (opens new window with default values)
Title produced by software: (Partial) Autocorrelation Function
Date of computation: Fri, 30 Nov 2007 04:46:52 -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/30/t119642256870m9iz05o3vbpj0.htm/, Retrieved Fri, 30 Nov 2007 12:36:10 +0100
 
User-defined keywords:
Workshop 8, question 1, autocorrelation function, duurzame consumptiegoederen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106.7 100.6 101.2 93.1 84.2 85.8 91.8 92.4 80.3 79.7 62.5 57.1 100.8 100.7 86.2 83.2 71.7 77.5 89.8 80.3 78.7 93.8 57.6 60.6 91 85.3 77.4 77.3 68.3 69.9 81.7 75.1 69.9 84 54.3 60 89.9 77 85.3 77.6 69.2 75.5 85.7 72.2 79.9 85.3 52.2 61.2 82.4 85.4 78.2 70.2 70.2 69.3 77.5 66.1 69 75.3 58.2 59.7
 
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.92820
10.1866351.2930.101092
20.1874621.29880.100113
30.2611721.80950.038323
4-0.078519-0.5440.705519
50.0760680.5270.300304
60.0306460.21230.416378
7-0.092895-0.64360.738549
80.0541240.3750.354662
9-0.057899-0.40110.654949
10-0.040794-0.28260.610661
110.0035610.02470.49021
12-0.234953-1.62780.944943
13-0.092873-0.64340.7385
14-0.004766-0.0330.513102
15-0.07508-0.52020.697333
16-0.145553-1.00840.840845
170.0511850.35460.362213
180.0547860.37960.35297
19-0.101051-0.70010.756379
200.0216390.14990.440729
210.0554520.38420.35127
22-0.086575-0.59980.724274
230.0855420.59260.278099
24-0.037562-0.26020.602103
25-0.125059-0.86640.804718
260.0019010.01320.494773
27-0.143292-0.99280.837097
28-0.028302-0.19610.577314
29-0.022309-0.15460.561092
30-0.164698-1.14110.870247
310.0801680.55540.290592
32-0.01864-0.12910.551108
33-0.189933-1.31590.90277
34-0.054647-0.37860.646674
35-0.07963-0.55170.70814


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
00.1866351.2930.101092
10.1581371.09560.139359
20.2148741.48870.071555
3-0.193965-1.34380.907339
40.0482370.33420.369843
5-0.004045-0.0280.511119
6-0.053573-0.37120.643925
70.033360.23110.4091
8-0.045233-0.31340.622327
90.000460.00320.498736
10-0.021705-0.15040.559451
11-0.212296-1.47080.926069
12-0.030578-0.21190.58344
130.0901530.62460.267597
140.049640.34390.366207
15-0.231533-1.60410.942375
160.1269410.87950.191763
170.1473421.02080.15623
18-0.167801-1.16260.874622
19-0.069028-0.47820.682674
200.157841.09350.139806
21-0.052172-0.36150.640329
22-0.006471-0.04480.517787
23-0.108733-0.75330.772534
24-0.102315-0.70890.759081
250.0383060.26540.395921
26-0.057303-0.3970.653438
27-0.102829-0.71240.760173
280.0293070.2030.419978
290.0373670.25890.398414
300.0023690.01640.493487
31-0.124145-0.86010.802996
32-0.073387-0.50840.693263
33-0.071828-0.49760.689494
340.009690.06710.473378
350.0899750.62340.267997
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t119642256870m9iz05o3vbpj0/1lhz81196423209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t119642256870m9iz05o3vbpj0/1lhz81196423209.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t119642256870m9iz05o3vbpj0/2cpri1196423209.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t119642256870m9iz05o3vbpj0/2cpri1196423209.ps (open in new window)


 
Parameters:
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
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