lm_model: Linear Model across Responses

View source: R/estimators.R

lm_modelR Documentation

Linear Model across Responses

Description

Apply a linear model in parallel across each response $y$ in an outcome or mediation model. This is often useful for mediator models with few pretreatment variables, since each input is low-dimensional, even when there are many responses.

Usage

lm_model(progress = TRUE)

Arguments

progress

A logical indicating whether to show a progress bar during estimation.

Value

model An object of class model with estimator, predictor, and sampler functions associated wtih a linear model.

See Also

model

Examples

m <- lm_model()
estimator(m)(mpg ~ hp + wt, data = mtcars)

multimedia documentation built on Sept. 30, 2024, 9:28 a.m.