- formula
A two-sided linear formula object describing both the fixed-effects and random-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. Random-effects terms are distinguished by vertical bars ("|") separating expressions for design matrices from grouping factors.
- data
A data frame or list containing the model response variable and covariates required by the formula. By default the variables are taken from environment(formula and smoothZ), typically the environment from which semireg is called.
- family
A GLM family, see glm and family.
- ngbinomial
Logical scalar - Should a negative binomial GLMMs be used? .
- REML
Logical scalar - Should the estimates be chosen to optimize the REML criterion (as opposed to the log-likelihood)?
- smoothZ
A list includes a set of smooth Z matrixs (called 'smooth term') used in the mixed effects model, the name of 'smooth term' should be different any variables in the model, each 'smooth term' is the result of function smZ
. e.g.
smoothZ=list(sm1=smZ(x1), sm2=smZ(x2, by=f1), sm3=smZ(x3, by=f2, group=TRUE), ...) where 'sm1' to 'sm3' should be new variable names in the data
, and x1 to x3 are covariates, and f1, f2 are factors.
- ncenter
Logical scalar - Should the numeric predictors to be centered or not?
- nscale
Logical scalar - Should the numeric predictors to be scaled or not?
- resp_scale
Logical scalar - Should the response be involved in the scaling action or not?
- control
A list (of correct class, resulting from lmerControl() or glmerControl() respectively) containing control parameters, including the nonlinear optimizer to be used and parameters to be passed through to the nonlinear optimizer, see the *lmerControl documentation for details.
- start
Starting value list as used by lmer or glmer.
- verbose
Passed on to fitting lme4 fitting routines.
- drop.unused.levels
By default unused levels are dropped from factors before fitting. For some smooths involving factor variables you might want to turn this off. Only do so if you know what you are doing.
- subset
An optional expression indicating the subset of the rows of data that should be used in the fit. This can be a logical vector, or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.
- weights
An optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector.
- offset
This can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases. One or more offset terms can be included in the formula instead or as well, and if more than one is specified their sum is used. See model.offset.
- contrasts
An optional list. See the contrasts.arg of model.matrix.default.
- prt
Logical scalar - Should the info to be print on screen in the middle of the process or not?
- predict_info
Logical scalar - Should provide the info for function semipred or not?
- ...
Further arguments for passing on to model setup routines.