parametric_bootstrap: Perform Parametric Bootstrap for Model Risk Estimation

View source: R/cat_glm_tune.R

parametric_bootstrapR Documentation

Perform Parametric Bootstrap for Model Risk Estimation

Description

This function performs parametric bootstrapping to estimate model risk. It fits a sequence of Generalized Linear Models (GLMs) with different values of tau, calculates the in-sample prediction error, and incorporates deviations from the bootstrap response samples. The final risk estimate is obtained by combining the in-sample error and the covariance penalty derived from the bootstrap samples.

Usage

parametric_bootstrap(
  formula,
  cat_init,
  tau_seq,
  tau_0,
  discrepancy_method,
  parametric_bootstrap_iteration_times,
  ...
)

Arguments

formula

A formula specifying the GLMs. Should at least include response variables.

cat_init

A list generated from cat_glm_initialization.

tau_seq

A sequence of tuning parameter values (tau) over which the model risk will be estimated. Each tau value is used to weight the synthetic data during model fitting.

tau_0

A reference value for tau used in the preliminary estimate model and variance calculation.

discrepancy_method

The method used to calculate the discrepancy (e.g., logistic deviance).

parametric_bootstrap_iteration_times

The number of bootstrap iterations to perform.

...

Other arguments passed to other internal functions.

Details

  1. 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.

  2. Bootstrap Samples: The function generates bootstrap response samples based on the mean and standard deviation of the preliminary estimate model, using parametric bootstrapping.

  3. In-sample Prediction Error: For each value of tau in tau_seq, the function computes the in-sample prediction error (e.g., using logistic deviance).

  4. Bootstrap Models: For each bootstrap iteration, the function fits a GLM using the bootstrap response samples and calculates the corresponding lambda values.

  5. Covariance Penalty: The function approximates the covariance penalty using the weighted deviations across all bootstrap iterations.

  6. Final Risk Estimate: The final model risk estimate is calculated by summing the in-sample prediction error and the average weighted deviations from the bootstrap response samples.

Value

A numeric vector containing the risk estimates for each tau in tau_seq.


catalytic documentation built on April 4, 2025, 5:51 a.m.