Skip to contents

This is the simplest possible density estimator that is entertainable. It fits a lm model to the data, and uses the variance of the residuals to parameterize a model of the data as \(\mathcal N(y | \beta x, \sigma^2)\).

Usage

lnr_lm_density(data, formula, ...)

Value

a closure (function) that produces density estimates at the newdata given according to the fit model.