GMMBoost (version 1.1.3)

bGAMM: Fit Generalized Semiparametric Mixed-Effects Models

Description

Fit a semiparametric mixed model or a generalized semiparametric mixed model.

Usage

bGAMM(fix=formula, add=formula, rnd=formula, 
      data, lambda, family = NULL, control = list())

Value

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.

call

a list containing an image of the bGLMM call that produced the object.

coefficients

a vector containing the estimated fixed effects

ranef

a vector containing the estimated random effects.

spline.weights

a vector containing the estimated spline coefficients.

StdDev

a scalar or matrix containing the estimates of the random effects standard deviation or variance-covariance parameters, respectively.

fitted.values

a vector of fitted values.

phi

estimated scale parameter, if overdispersion=TRUE is used. Otherwise, it is equal to one.

HatMatrix

hat matrix corresponding to the final fit.

IC

a matrix containing the evaluated information criterion for the different covariates (columns) and for each boosting iteration (rows).

IC_sel

a vector containing the evaluated information criterion for the selected covariate at different boosting iterations.

components

a vector containing the selected components at different boosting iterations.

opt

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.

Deltamatrix

a matrix containing the estimates of fixed and random effects (columns) for each boosting iteration (rows).

Q_long

a list containing the estimates of the random effects standard deviation or variance-covariance parameters, respectively, for each boosting iteration.

fixerror

a vector with standrad errors for the fixed effects.

ranerror

a vector with standrad errors for the random effects.

smootherror

a matrix with pointwise standard errors for the smooth function estimates.

Arguments

fix

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

add

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.

rnd

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.

data

the data frame containing the variables named in formula.

lambda

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.

family

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.

control

a list of control values for the estimation algorithm to replace the default values returned by the function bGAMMControl. Defaults to an empty list.

References

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.

See Also

bGAMMControl

Examples

Run this code
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