Description Usage Arguments Details Value Author(s) Examples

Inverts the second derivative matrix of the log-likelihood to obtain the estimated covariance matrix of the parameters.

1 | ```
mySolve(A)
``` |

`A` |
Matrix; the negative second derivative of the log-likelihood |

`mySolve`

attempts to invert its matrix argument. If the matrix
supplied is not invertible, `ErrCode`

is set to 1.

`Ainv` |
inverse of the negative second derivative of the loglikelihood. If the inverse is unable to be obtained, returns the original negative second derivative of the log-likelihood. |

`ErrCode` |
Numeric; 0 if the inverse can be found, 1 if not. |

"William T.M. Dunsmuir" <w.dunsmuir@unsw.edu.au>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
### Using the polio data
data(Polio)
y <- Polio[, 2]
X <- as.matrix(Polio[, 3:8])
## Construct the vectors of phi lags and theta lags
theta.lags <- c(1, 2, 5)
phi.lags <- rep(0, 0)
## Construct the initial delta vector
delta <- c("Intcpt" = 0.2069383, "Trend" = -4.7986615 ,
"CosAnnual" = -0.1487333, "SinAnnual" = -0.5318768,
"CosSemiAnnual" = 0.1690998, "SinSemiAnnual" = -0.4321435,
"theta_1" = 0, "theta_2"= 0, "theta_5"= 0 )
## Calculate the second derivative of the loglikelihood
glarmamod <- glarmaPoissonPearson(y, X, delta = delta, phiLags = phi.lags,
thetaLags = theta.lags, method = "FS")
## estimate the covariance matrix of the estimators from the second
## derivative of the loglikelihood
mySolve(-glarmamod$ll.dd)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.