Home » date » 2007 » Dec » 06 » attachments

Workshop 5 vraag 1

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 11:10:49 -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/t1196963907p1jliujs990tgdx.htm/, Retrieved Thu, 06 Dec 2007 18:58:29 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
89.97 99.8 112.99 93.69 108.02 99.11 94.33 83.75 106.37 109.63 105.5 96.13 102.48 101.37 112.76 95.57 102.81 104.13 97.52 85.29 101.01 108.48 101.33 87.57 97.44 96.06 106.67 102.67 104.54 102.46 103.35 83.27 108.22 115.23 103.7 93.61 100.25 100.56 108.86 105.43 104.77 109.13 106.13 82.27 113.6 117.73 104.83 104.61 102.93 106.95 123.45 111.99 103.95 122.05 108.04 93.72 119.61 118.29 117.14 112.76 105.97 107.96 122.27 114.54 110.15 120.02 103.94 96.18 121.01 110.55 120.04 114.19
 
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.42610
1-0.355295-2.99380.998105
2-0.27199-2.29180.987558
30.0823460.69390.245017
40.0934850.78770.216742
5-0.174678-1.47190.927262
60.2676162.2550.01361
7-0.240727-2.02840.976864
80.2081441.75390.041886
90.0629080.53010.298856
10-0.341115-2.87430.99733
11-0.174438-1.46980.926988
120.7128146.00630
13-0.272791-2.29860.987762
14-0.152408-1.28420.898379
15-0.001081-0.00910.503622
160.0595490.50180.308692
17-0.06451-0.54360.705781
180.1619951.3650.088283
19-0.210236-1.77150.959614
200.2450212.06460.021308
21-0.019615-0.16530.565405
22-0.296552-2.49880.992611
23-0.032756-0.2760.608327
240.4469673.76620.000169
25-0.170994-1.44080.922984
26-0.037577-0.31660.623774
27-0.136641-1.15140.873276
280.1351791.1390.129258
29-0.054348-0.45790.675804
300.0647750.54580.293455
31-0.095178-0.8020.787381
320.173261.45990.074362
33-0.04339-0.36560.642129
34-0.179657-1.51380.932744
35-0.053249-0.44870.672487


Partial Autocorrelation Function
Time lag kPACF(k)T-STATP-value
0-0.355295-2.99380.998105
1-0.455757-3.84030.999868
2-0.318173-2.6810.995439
3-0.214966-1.81130.962841
4-0.414448-3.49220.999586
5-0.023819-0.20070.579249
6-0.394715-3.32590.999301
70.1046040.88140.190536
80.2874792.42230.008988
9-0.082724-0.6970.755975
10-0.509212-4.29070.999972
110.1823121.53620.064468
120.1491.25550.106707
130.1539621.29730.099363
14-0.077627-0.65410.742419
15-0.068839-0.580.718141
16-0.008754-0.07380.529297
17-0.036564-0.30810.620544
180.0216710.18260.427816
19-0.025785-0.21730.58569
20-0.161466-1.36050.911018
21-0.160375-1.35130.909562
220.0178510.15040.440433
23-0.065488-0.55180.708596
24-0.077824-0.65580.74295
250.0330330.27830.39078
26-0.131872-1.11120.864879
270.142811.20330.116421
28-0.019327-0.16290.564451
290.0008130.00680.497278
300.0651940.54930.292251
31-0.163362-1.37650.913506
320.049490.4170.338963
330.0190870.16080.436343
34-0.038739-0.32640.627468
35-0.062132-0.52350.698885
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196963907p1jliujs990tgdx/1lfpe1196964647.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196963907p1jliujs990tgdx/1lfpe1196964647.ps (open in new window)


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


 
Parameters:
par1 = TRUE ; par2 = 1 ; par3 = 2 ; par4 = 1 ; 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