get.model.combos {mmodely} | R Documentation |
All combinations of predictor variables
Description
Enumerate all combinations of predictor variables in a multivariate regression model.
Usage
get.model.combos(outcome.var, predictor.vars, min.q=1)
Arguments
predictor.vars |
predictor variables names (a vector of character strings) |
outcome.var |
outcome variable name (character string) |
min.q |
minimum number of predictor variables to include in the mode (default is 2) |
Value
a vector of models as character strings of the form "y ~ x1 + x2 ..."
Examples
path <- system.file("extdata","primate-example.data.csv", package="mmodely")
data <- read.csv(path, row.names=1)
get.model.combos(outcome.var='OC', predictor.vars=names(data), min.q=2)
[Package mmodely version 0.2.5 Index]