Usage
cpglmm(formula, link = "log", data, weights, offset, subset,
na.action, inits = NULL, contrasts = NULL,
control = list(), basisGenerators = c("tp","tpU","bsp","sp2d"),
optimizer = "nlminb", doFit = TRUE, nAGQ = 1)
Arguments
formula
a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. The vertical bar character "|" separates an expression for a model matri
link
a specification for the model link function. This can be either a literal character string or a numeric number. If it is a character string, it must be one of "log", "identity", "sqrt" or "inverse". If it is numeric, it is the same as the link.power
data
an optional data frame, list or environment (or object coercible by as.data.frame
to a data frame) containing the variables in the model.
subset, weights, na.action, offset, contrasts
further model specification arguments as in glm
; see there for details. inits
a named list with three components 'beta', 'phi', 'p', 'Sigma' that supply the initial values used in the optimization. If not supplied, the function will generate initial values automatically, which are based on a GLM with the supplied model structure.
control
a list of parameters for controlling the fitting process. See 'Details' below.
basisGenerators
a character vector of names of functions that generate spline bases. This is used when smoothing effects are to be included in the model. See amer
and tp
for optimizer
a character string that determines which optimization routine is to be used. Possible choices are "nlminb"
(the default, see nlminb
), "bobyqa"
(
doFit
if FALSE
, no model will be fitted and the constructed "cpglmm"
object is returned.
nAGQ
a positive integer - the number of points per axis for evaluating the adaptive Gauss-Hermite approximation to the log-likelihood. This defaults to 1, corresponding to the Laplacian approximation. Values greater than 1 produce greater accuracy in the evalu