updateModel: Extend and Re-fit a Model Call

View source: R/utils.R

updateModelR Documentation

Extend and Re-fit a Model Call

Description

updateModel adds new variables to model and re-fit it.

Usage

updateModel(object, x, placeholder = NULL, backquote = TRUE, collapse = " + ")

Arguments

object

An existing fit from a model function such as lm, glm and many others.

x

Character vector specifying variables to be added to model.

placeholder

String specifying term to substitute with value from x. Ignored if set to NULL.

backquote

Logical indicating if added variables should be quoted. Elements of this vector are recycled over x.

collapse

String specifying how variables should be combined. Defaults to " + " ie. linear combination.

Value

Updated fitted object.


Genentech/midasHLA documentation built on Feb. 12, 2024, 9:38 a.m.