Fit a semiparametric mixed model or a generalized semiparametric mixed model.
bGAMM(fix=formula, add=formula, rnd=formula,
data, lambda, family = NULL, control = list())
Generic functions such as print
, predict
, summary
and plot
have methods to show the results of the fit.
The predict
function uses also estimates of random effects for prediction, if possible (i.e. for known subjects of the grouping factor).
The plot
function shows the estimated smooth functions. Single functions can be specified by a suitable vector in the which
argument.
Default is which=Null
and all smooth functions (up to a maximum of nine) are shown.
a list containing an image of the bGLMM
call that produced the object.
a vector containing the estimated fixed effects
a vector containing the estimated random effects.
a vector containing the estimated spline coefficients.
a scalar or matrix containing the estimates of the random effects standard deviation or variance-covariance parameters, respectively.
a vector of fitted values.
estimated scale parameter, if overdispersion=TRUE
is used. Otherwise, it is equal to one.
hat matrix corresponding to the final fit.
a matrix containing the evaluated information criterion for the different covariates (columns) and for each boosting iteration (rows).
a vector containing the evaluated information criterion for the selected covariate at different boosting iterations.
a vector containing the selected components at different boosting iterations.
number of optimal boosting steps with respect to AIC or BIC, respectively, if OPT=TRUE
. Otherwise, opt
is equal to the number of iterations.
Note, that the boosting algorithm is also stopped, if it has converged with respect to the parameter estimates [coefficients,ranef]
or with respect to the IC_sel
.
a matrix containing the estimates of fixed and random effects (columns) for each boosting iteration (rows).
a list containing the estimates of the random effects standard deviation or variance-covariance parameters, respectively, for each boosting iteration.
a vector with standrad errors for the fixed effects.
a vector with standrad errors for the random effects.
a matrix with pointwise standard errors for the smooth function estimates.
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. For categorical covariables use as.factor(.)
in the formula.
Note, that the corresponding dummies are treated as a group and are updated blockwise
a one-sided linear formula object describing the
additive part of the model, with the additive terms on the right side of a
~
operator, separated by +
operators. The smooth terms
are expanded in B-spline basis functions, with a difference penalty apllied on adjacent spline coefficients.
a two-sided linear formula object describing the
random-effects part of the model, with the grouping factor on the left of a
~
operator and the random terms, separated by +
operators, on
the right.
the data frame containing the variables named in
formula
.
the smoothing parameter that controls the smoothness of the additive terms. The optimal smoothing parameter is a tuning parameter of the procedure that has to be determined, e.g. by use of information criteria or cross validation.
a GLM family, see glm
and
family
. If family
is missing then a
linear mixed model is fit; otherwise a generalized linear mixed
model is fit.
a list of control values for the estimation algorithm to replace the default values returned by the function bGAMMControl
. Defaults to an empty list.
Andreas Groll andreas.groll@stat.uni-muenchen.de
Groll, A. and G. Tutz (2012). Regularization for Generalized Additive Mixed Models by Likelihood-Based Boosting. Methods of Information in Medicine 51(2), 168--177.
bGAMMControl
data("soccer")
gamm1 <- bGAMM(points ~ ball.possession + tackles,
~ transfer.spendings + transfer.receits
+ unfair.score + ave.attend + sold.out,
rnd = list(team=~1), data = soccer, lambda = 1e+5,
family = poisson(link = log), control = list(steps=200, overdispersion=TRUE,
start=c(1,rep(0,25))))
plot(gamm1)
# see also demo("bGAMM-soccer")
Run the code above in your browser using DataCamp Workspace