removeAllMissingCatVar: A function to remove categorical variables with insufficient...

Description Usage Arguments Value Author(s) Examples

View source: R/removeAllMissingCatVar.R

Description

This function removes categorical variables from mixture models. This is needed when metabolite values are entirely missing or only present for one level of the categorical variable, making it impossible to estimate effects for the categorical variable.

Usage

1
removeAllMissingCatVar(cat.varname,  mxtrModel)

Arguments

cat.varname

A character string indicating a categorical predictor variable in the mixture model.

mxtrModel

A mixture model formula of class formula.

Value

Returns a mixture model formula of class formula with the variable indicated in cat.varname omitted.

Author(s)

Michael Nodzenski

Examples

1
2
3
4
5
#specifiy mixture model 
mix.model<- ~ var1 + var2 | var1 + var2

#remove var1 
removeAllMissingCatVar("var1", mix.model)

metabomxtr documentation built on Nov. 17, 2017, 10:57 a.m.