GMMBoost (version 1.1.3)

bGLMM: Fit Generalized Mixed-Effects Models

Description

Fit a linear mixed model or a generalized linear mixed model.

Usage

bGLMM(fix=formula, rnd=formula, data, family = NULL, control = list())

Value

Generic functions such as print, predict and summary 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).

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.

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.

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

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.

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 bGLMMControl. Defaults to an empty list.

References

Tutz, G. and A. Groll (2010). Generalized linear mixed models based on boosting. In T. Kneib and G. Tutz (Eds.), Statistical Modelling and Regression Structures - Festschrift in the Honour of Ludwig Fahrmeir. Physica.

See Also

bGLMMControl

Examples

Run this code

data("soccer")
## linear mixed models
lm1 <- bGLMM(points ~ transfer.spendings + I(transfer.spendings^2)
       + ave.unfair.score + transfer.receits + ball.possession
       + tackles + ave.attend + sold.out, rnd = list(team=~1), data = soccer)
      
lm2 <- bGLMM(points~transfer.spendings + I(transfer.spendings^2)
       + ave.unfair.score + transfer.receits + ball.possession
       + tackles + ave.attend + sold.out, rnd = list(team=~1 + ave.attend), 
       data = soccer, control = list(steps=10, lin=c("(Intercept)","ave.attend"), 
       method="REML", nue=1, sel.method="bic"))

## linear mixed models with categorical covariates
lm3 <- bGLMM(points ~ transfer.spendings + I(transfer.spendings^2)
       + as.factor(red.card) + as.factor(yellow.red.card) 
       + transfer.receits + ball.possession + tackles + ave.attend
       + sold.out, rnd = list(team=~1), data = soccer, control = list(steps=10))


## generalized linear mixed model
glm1 <- bGLMM(points~transfer.spendings  + I(transfer.spendings^2)
        + ave.unfair.score + transfer.receits + ball.possession
        + tackles + ave.attend + sold.out, rnd = list(team=~1),  
        family = poisson(link = log), data = soccer, 
        control = list(start=c(5,rep(0,31))))

   

Run the code above in your browser using DataCamp Workspace