get_glm_custom_var: Get Custom Variance for Generalized Linear Model (GLM)

get_glm_custom_varR Documentation

Get Custom Variance for Generalized Linear Model (GLM)

Description

This function calculates a custom variance for a Generalized Linear Model (GLM) based on the specified formula, the model initialization object, and a scaling factor tau. The custom variance is computed by adjusting the residuals of the fitted model and returning a weighted sum of squared residuals.

Usage

get_glm_custom_var(formula, cat_init, tau)

Arguments

formula

A formula object specifying the GLM model to be fitted, such as response ~ predictors.

cat_init

A list object containing the initialization data for the model. Generated from cat_initialization

tau

A numeric value representing a scaling factor for down-weighting synthetic data

Value

A numeric value representing the custom variance for the GLM model.


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