Learn R Programming

multimedia (version 0.2.0)

lm_model: 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)

Value

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

Arguments

progress

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

See Also

model

Examples

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

Run the code above in your browser using DataLab