update.LinRegProblem: Update a 'LinRegProblem' Object with a New Formula

View source: R/methods.R

update.LinRegProblemR Documentation

Update a LinRegProblem Object with a New Formula

Description

Update a LinRegProblem Object with a New Formula

Usage

## S3 method for class 'LinRegProblem'
update(object, new_formula, ...)

Arguments

object

A LinRegProblem object.

new_formula

A new model formula. model.matrix will attempt to evaluate it in the context of the existing object's column names.

...

Additional arguments to LinRegProblem to use when creating the new object, or to pass on to methods.

Details

This function refits an existing LinRegProblem object to a new formula.The formula must be valid in the context of existing column names.

Value

If successful, the updated LinRegProblem object.

Examples

X <- LinRegProblem(mtcars[, -1], mtcars[, 1], Y_transform = scale)
update(X, Y ~ X1 + X2)

ryan-heslin/RegLesson documentation built on Aug. 5, 2022, 9:03 p.m.