ForwardSelect: Forward Selection for Generalized (Mixed) Linear Models with...

Description Usage Arguments Details References Examples

View source: R/sequential.R

Description

This is an elimination procedure for ...

Usage

1

Arguments

formula

A formula which may contain random effects according to the lme4 package's specification.

data

Either a mids object from the mice package, or a data frame.

cutoff

The alpha level which determines the stopping rule. Once all remaining model terms fall below this value, the procedure terminates.

family

Any family accepted by glm or lmer. Do not use quotation marks.

Details

The procedure works like this...

References

Douglas Bates and Martin Maechler (2010). lme4: Linear mixed-effects models using S4 classes. R package version 0.999375-37. http://CRAN.R-project.org/package=lme4

Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3), 1-67. URL http://www.jstatsoft.org/v45/i03/.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(missing)

# A sample data set with missing values
head(missing)

# creating a Muliply Imputed Data Set (mids) object
mids <- ImputeData(missing, m = 5, maxit = 5)

# a single imputation
complete <- complete(mids)

# Backwards elimination for fixed effect models 
ForwardSelect(y ~ x + w + z, data = complete)
ForwardSelect(y ~ x + w + z, data = mids)

# Backwards elimination for mixed (fixed and random) models
ForwardSelect(y ~ (1 | factor.1) + x + w + z, data = complete)
ForwardSelect(y ~ (1 | factor.1) + x + w + z, data = mids)

google/glmmplus documentation built on May 17, 2019, 7:47 a.m.