### Example with asthma data
data(Asthma)
y <- Asthma[,1]
X <- as.matrix(Asthma[,2:16])
## Model in Davis, Dunsmuir and Streett (2003)
## MA(7) specification - see Davis, Dunsmuir and Streett (2003)
## Pearson Residuals, Fisher Scoring
glarmamod <- glarma(y, X, thetaLags = 7, type = "Poi", method = "FS",
residuals = "Pearson", maxit = 100, grad = 1e-6)
glarmamod
summary(glarmamod)
likTests(glarmamod)
plot.glarma(glarmamod)
## Not run:
# ## Example is specified as \dontrun because it takes too long
# ## for package inclusion on CRAN
#
# ## Pearson Residuals, Newton Raphson, Negative Binomial
# ## Initial value of the shape parameter take to be zero
# glarmamod <- glarma(y, X, thetaLags = 7, type = "NegBin", method = "NR",
# residuals = "Pearson", alphaInit = 0,
# maxit = 100, grad = 1e-6)
# glarmamod
# summary(glarmamod)
#
# likTests(glarmamod)
# plot.glarma(glarmamod)
# ## End(Not run)
Run the code above in your browser using DataLab