Models_gen: Generate all subset models

View source: R/Models_gen.R

Models_genR Documentation

Generate all subset models

Description

This function generates a list including all subset models given a vector of candidate predictors.

Usage

Models_gen(predictors)

Arguments

predictors

a vector including the indexes of all predictors, such as 1:p.

Value

Returns a list with one entry for each model. Each entry is an integer vector that specifies the columns of matrix x to be used as a regressor in that model.

See Also

combn, list.flatten

Examples

Models_gen(1:5)

YuanyuanLi96/mac documentation built on Nov. 30, 2022, 7:34 p.m.