construct.blocksDS: Construct blocks from 'formulas' and 'predictorMatrix'

Description Usage Value See Also Examples

View source: R/construct.blocksDS.R

Description

This helper function attempts to find blocks of variables in the specification of the formulas and/or predictorMatrix objects. Blocks specified by formulas may consist of multiple variables. Blocks specified by predictorMatrix are assumed to consist of single variables. Any duplicates in names are removed, and the formula specification is preferred. predictorMatrix and formulas. When both arguments specify models for the same block, the model for the predictMatrix is removed, and priority is given to the specification given in formulas.

Usage

1
construct.blocksDS(formulas = NULL, predictorMatrix = NULL)

Value

A blocks object.

See Also

make.blocks, name.blocks

Examples

1
2
3
form <- name.formulas(list(bmi + hyp ~ chl + age, chl ~ bmi))
pred <- make.predictorMatrix(nhanes[, c("age", "chl")])
construct.blocks(formulas = form, pred = pred)

stefvanbuuren/dsMice documentation built on Aug. 26, 2020, 1:44 p.m.