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:28:35 -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/t11964214831beytanp3mvj9wu.htm/, Retrieved Fri, 30 Nov 2007 12:18:05 +0100
 
User-defined keywords:
Workshop 8, question 1, autocorrelation function, niet-duurzame consumptiegoederen
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112,7 118,4 108,1 105,4 114,6 106,9 115,9 109,8 101,8 114,2 110,8 108,4 127,5 128,6 116,6 127,4 105 108,3 125 111,6 106,5 130,3 115 116,1 134 126,5 125,8 136,4 114,9 110,9 125,5 116,8 116,8 125,5 104,2 115,1 132,8 123,3 124,8 122 117,4 117,9 137,4 114,6 124,7 129,6 109,4 120,9 134,9 136,3 133,2 127,2 122,7 120,5 137,8 119,1 124,3 134,3 121,7 125
 
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.1440050.99770.161714
20.053470.37050.356337
30.2013141.39470.084757
40.0090450.06270.475147
50.0765410.53030.299177
60.1440960.99830.161563
7-0.163556-1.13310.86861
80.0052030.0360.485696
90.1856071.28590.10232
10-0.158944-1.10120.861848
11-0.115718-0.80170.786666
12-0.178473-1.23650.888855
13-0.111832-0.77480.778869
140.0967860.67060.252859
15-0.114129-0.79070.783499
16-0.127459-0.88310.809197
170.1086020.75240.227737
18-0.016244-0.11250.544569
19-0.146798-1.0170.842884
200.0122510.08490.466356
21-0.067651-0.46870.679298
22-0.122562-0.84910.799988
230.079110.54810.293084
24-0.251648-1.74350.956173
25-0.180541-1.25080.89147
26-0.047742-0.33080.628868
27-0.008267-0.05730.522719
28-0.045161-0.31290.622137
290.0748910.51890.303121
300.0089990.06230.475272
310.0224730.15570.438461
320.0424320.2940.385022
33-0.128348-0.88920.81084
340.0601750.41690.339304
350.0301850.20910.417616


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
00.1440050.99770.161714
10.0334260.23160.408923
20.1932771.33910.093428
3-0.0487-0.33740.631359
40.0747410.51780.303482
50.0913260.63270.264958
6-0.204731-1.41840.918736
70.0311420.21580.415046
80.1640371.13650.130698
9-0.170365-1.18030.878157
10-0.118721-0.82250.792576
11-0.206857-1.43310.920851
120.0619140.4290.334938
130.124140.86010.197014
14-0.140758-0.97520.832825
150.0207720.14390.443085
160.1287860.89230.188354
17-0.036418-0.25230.599062
18-0.196132-1.35880.909726
190.024190.16760.433804
200.1217090.84320.201643
21-0.236708-1.640.946224
22-0.07039-0.48770.686001
23-0.175556-1.21630.885089
24-0.025686-0.1780.570248
25-0.14809-1.0260.844983
260.0975810.67610.251122
270.1242730.8610.196762
280.1233540.85460.198503
29-0.023829-0.16510.565219
30-0.080714-0.55920.710688
310.0019110.01320.494744
32-0.112983-0.78280.781196
33-0.051022-0.35350.637367
34-0.05773-0.40.654521
35-0.028493-0.19740.577829
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t11964214831beytanp3mvj9wu/1r6lm1196422113.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t11964214831beytanp3mvj9wu/1r6lm1196422113.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t11964214831beytanp3mvj9wu/278es1196422113.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Nov/30/t11964214831beytanp3mvj9wu/278es1196422113.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