removeConst {bbl}R Documentation

Remove Non-varying Predictors

Description

Constant predictor is identified and removed

Usage

removeConst(x)

Arguments

x

Data frame containing discrete factor variables in each column

Details

Variables with only one factor level is removed from data. Intended for use before calling bbl.

Value

Data frame omitting non-varying variables from x.

Examples

set.seed(351)
nt <- c('a','c','g','t')
x <- data.frame(v1=sample(nt,size=50,replace=TRUE),
                v2=rep('a',50),v3=sample(nt,size=50,replace=TRUE))
y <- sample(c('case','ctrl'),size=50,replace=TRUE)
dat <- cbind(data.frame(y=y), x)
summary(dat)
dat <- removeConst(dat)
summary(dat)

[Package bbl version 1.0.0 Index]