Models_gen {maclogp}R 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)

[Package maclogp version 0.1.1 Index]