Last data update: 2014.03.03

R: Autocorrelation function plots for ACD models
acf_acdR Documentation

Autocorrelation function plots for ACD models

Description

plots the ACF (Auto Correlation Function) for the durations, diurnally adjusted durations, and residuals.

Usage

acf_acd(fitModel = NULL, conf_level = 0.95, max = 50, min = 1)

Arguments

fitModel

a fitted model of class "acdFit", or a data.frame containing at least one the columns "durations", "adjDur", or "residuals". Can also be a vector of durations or residuals.

conf_level

the confidence level of the confidence bands

max

the largest lag to plot

min

the smallest lag to plot

Value

returns a data.frame with the values of the sample autocorrelations for each lag and variable.

Author(s)

Markus Belfrage

Examples

fitModel <- acdFit(adjDurData)
acf_acd(fitModel, conf_level = 0.95, max = 50, min = 1)

f <- acf_acd(durData)
f

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ACDm)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ACDm/acf_acd.Rd_%03d_medium.png", width=480, height=480)
> ### Name: acf_acd
> ### Title: Autocorrelation function plots for ACD models
> ### Aliases: acf_acd
> 
> ### ** Examples
> 
> fitModel <- acdFit(adjDurData)

ACD model estimation by (Quasi) Maximum Likelihood 

Call:
  acdFit(durations = adjDurData) 

Model:
  ACD(1, 1)

Distribution:
  exponential

N: 34767

Parameter estimate:
         Coef      SE PV robustSE
omega  0.0127 0.00132  0  0.00125
alpha1 0.0587 0.00277  0  0.00236
beta1  0.9295 0.00359  0  0.00306


The fixed/unfree mean distribution parameter: 
 lambda: 1

QML robust correlations:
        omega alpha1  beta1
omega   1.000  0.442 -0.762
alpha1  0.442  1.000 -0.902
beta1  -0.762 -0.902  1.000


Goodness of fit:
                      value
LogLikelihood -33300.775975
AIC            66607.551949
BIC            66632.921221
MSE                1.798696

Convergence: 0 

Number of log-likelihood function evaluations: 114 

Estimation time: 0.592 secs 

Description: Estimated at 2016-07-04 14:06:34 by user ddbj

> acf_acd(fitModel, conf_level = 0.95, max = 50, min = 1)
> 
> f <- acf_acd(durData)
> f
          acf lag      data
1  0.18624246   1 durations
2  0.15335076   2 durations
3  0.13339397   3 durations
4  0.12331233   4 durations
5  0.12969901   5 durations
6  0.11259252   6 durations
7  0.12771562   7 durations
8  0.12590637   8 durations
9  0.13470686   9 durations
10 0.12522153  10 durations
11 0.12393192  11 durations
12 0.11844846  12 durations
13 0.11380025  13 durations
14 0.10347579  14 durations
15 0.11169727  15 durations
16 0.10432296  16 durations
17 0.11095307  17 durations
18 0.10354207  18 durations
19 0.11161794  19 durations
20 0.10343375  20 durations
21 0.09795190  21 durations
22 0.11234233  22 durations
23 0.11085447  23 durations
24 0.11000891  24 durations
25 0.11237491  25 durations
26 0.10348698  26 durations
27 0.10032814  27 durations
28 0.10248837  28 durations
29 0.11287275  29 durations
30 0.09130177  30 durations
31 0.10780442  31 durations
32 0.09668985  32 durations
33 0.11202928  33 durations
34 0.10577127  34 durations
35 0.10106360  35 durations
36 0.09394823  36 durations
37 0.10683860  37 durations
38 0.10603657  38 durations
39 0.09133532  39 durations
40 0.09046057  40 durations
41 0.10073206  41 durations
42 0.09255339  42 durations
43 0.09702544  43 durations
44 0.10739463  44 durations
45 0.10180347  45 durations
46 0.08346449  46 durations
47 0.08914386  47 durations
48 0.08934420  48 durations
49 0.08836958  49 durations
50 0.10300498  50 durations
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>