layer_predictive_distn: Returns predictive distributions

View source: R/layer_predictive_distn.R

layer_predictive_distnR Documentation

Returns predictive distributions

Description

[Deprecated]

Usage

layer_predictive_distn(
  frosting,
  ...,
  dist_type = c("gaussian", "student_t"),
  truncate = c(-Inf, Inf),
  name = ".pred_distn",
  id = rand_id("predictive_distn")
)

Arguments

frosting

a frosting postprocessor

...

Unused, include for consistency with other layers.

dist_type

Gaussian or Student's t predictive intervals

truncate

Do we truncate the distribution to an interval

name

character. The name for the output column.

id

a random id string

Details

This function calculates an approximation to a parametric predictive distribution. Predictive distributions from linear models require ⁠x* (X'X)^{-1} x*⁠ along with the degrees of freedom. This function approximates both. It should be reasonably accurate for models fit using lm when the new point ⁠x*⁠ isn't too far from the bulk of the data.

Value

an updated frosting postprocessor with additional columns of the residual quantiles added to the prediction


cmu-delphi/epipredict documentation built on June 14, 2025, 2:41 a.m.