mallowian_estimate | R Documentation |
This function calculates the Mallowian estimate for model risk by fitting a sequence of
Generalized Linear Models (GLMs) with varying values of tau
. It uses the in-sample prediction
error along with a regularized projection matrix to estimate the model risk. The tau
parameter
influences the weighting of synthetic data during model fitting.
mallowian_estimate(formula, cat_init, tau_seq, ...)
formula |
A formula specifying the GLMs. Should at least include response variables. |
cat_init |
A list generated from |
tau_seq |
A sequence of tuning parameter values ( |
... |
Other arguments passed to other internal functions. |
Model Fitting: For each value of tau
in tau_seq
, the function fits a GLM model
using the observed and synthetic data. The synthetic data is weighted by the corresponding
tau
value during the fitting process.
In-sample Prediction Error: After fitting the model, the function computes the in-sample prediction error (Mean Squared Error) to assess the model's performance.
Regularized Projection Matrix: The function calculates a regularized projection matrix using the observed and synthetic data, which influences the covariance matrix used in risk estimation.
Mallowian Risk Estimate: The final Mallowian risk estimate is computed by combining the
in-sample prediction error with a penalty term involving the projection matrix and a variance term.
This estimate is calculated for each value of tau
in tau_seq
.
A numeric vector of Mallowian risk estimates, one for each value of tau
in tau_seq
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.