Learn R Programming

maclogp (version 0.1.1)

Models_gen: 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

Run this code
# NOT RUN {
Models_gen(1:5)
# }

Run the code above in your browser using DataLab