varCombosLinear: Generate all allowable linear covariate combinations for...

Description Usage Arguments Details Value Author(s)

Description

Generates a list of candidate variable combinations (linear effects only) for model selection, e.g., with AIC.

Usage

1
varCombosLinear(vars, K.max = length(vars), exclude = NULL)

Arguments

V

Character vector naming all variables from which to compile candidate combinations.

K.max

Numeric scalar setting the maximum number of variables in any given combination (default = length(vars)).

exclude

List whose elements are character vectors. Each element must be length > 1 and should represent a disallowed covariate combination, e.g., to avoid multi-collinearity. If set to the default (NULL), all combinations will be allowed within the 'K.max' limit.

Details

Generates a list of covariate combinations in the form "x1+x2+...+xK" with K = to the kth covariate and max k = 'K.max'. Elements of this list can be used to build formulas for use in linear regression modeling functions, e.g., lm, glm, etc.

Value

List with elements are strings representing candidate covariate combinations of form "x1+x2+...+xK".

Author(s)

Quresh S. Latif, Rocky Mountain Research Station, U.S. Forest Service


qureshlatif/WoodpeckerHSI documentation built on May 29, 2019, 7:51 a.m.