This function computes the Steinian estimate for model risk by fitting a sequence of
Generalized Linear Models (GLMs) with varying values of tau
. It combines the preliminary
estimate from a model fitted with an initial tau_0
value with a penalty term that incorporates
the in-sample prediction error and a covariance penalty, which is based on models fitted by inverting
the response of individual observations.
steinian_estimate(formula, cat_init, tau_seq, tau_0, ...)
A numeric vector of Steinian risk estimates, one for each value of tau
in tau_seq
.
A formula specifying the GLMs. Should at least include response variables.
A list generated from cat_glm_initialization
.
A sequence of tuning parameter values (tau
) over which
the Steinian estimate will be computed. Each value of tau
is used to weight the
synthetic data during model fitting.
A reference value for tau
that is used in the calculation of the
preliminary estimate model and the variance term.
Other arguments passed to other internal functions.
Preliminary Estimate Model: The function first fits a GLM model using the observed and
synthetic data with an initial value of tau_0
for the synthetic data weights.
In-sample Prediction Error: For each value of tau
in tau_seq
, the function computes
the in-sample prediction error (logistic deviance).
Steinian Penalty: The function calculates the Steinian covariance penalty for each observation by fitting a modified model that inverts one observation at a time. The penalty is added to the in-sample prediction error to obtain the final risk estimate.
Steinian Risk Estimate: The final Steinian risk estimate is calculated by summing the
in-sample prediction error and the Steinian penalty term for each value of tau
in tau_seq
.