get.model.combos: All combinations of predictor variables

View source: R/models.R

get.model.combosR 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)


mmodely documentation built on May 31, 2023, 6:47 p.m.