Matrix; explanatory variables. A vector of ones should be
added to the data matrix as the first column for the
$beta$ of the intercept.
offset
Either NULL or a numeric vector of length equal
to the number of cases. Used to specify an a priori known
component to be included in the linear predictor during fitting.
type
Character; the distribution of the counts.
alpha
Numeric; an optional initial value for the
theta parameter in the negative binomial distribution; the
default value is 1.
Value
Details
Generates and returns the initial parameters for the GLARMA model
under the specified distribution by fitting a generalized linear
model.
### Using the polio datadata(Polio)
y <- Polio[, 2]
X <- as.matrix(Polio[, 3:8])
glmMod <- initial(y, X, type = "Poi", alpha=1)
str(glmMod)
head(glmMod)