Skip to contents

This is a step up from the lnr_lm_density in that it uses a glm for the conditional mean model. Note that this allows for specification of glm features like family = ... in the ,.. arguments, and that's the main advantage over the lnr_lm_density. Also note that this still differs from using lnr_homoskedastic_density with mean_lnr = lnr_glm because lnr_homoscedastic_density uses stats::density to do kernel bandwidth smoothing on the error distribution of the mean predictions..

Usage

lnr_glm_density(data, formula, ...)

Arguments

data

A dataframe to train a learner / learners on.

formula

A regression formula to use inside this learner.

...

Any extra arguments that should be passed to the internal model for model fitting purposes.

Value

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