Skip to contents

Computes the standardized (G-computation) marginal risk difference under a fitted logistic regression model. This is a thin alias: it delegates directly to gcomp_fractional_logit_point_estimate_cpp (see that page for the full standardization formula and counterfactual-averaging methodology, which is identical for logistic and fractional-logit/quasi-binomial models), passing its arguments through unchanged.

Usage

gcomp_logistic_point_estimate_cpp(X_fit, coef_hat, j_treat)

Arguments

X_fit

Numeric matrix of predictors used to fit the model, including an intercept column if the model has one.

coef_hat

Numeric vector of fitted logistic regression coefficients \(\hat\beta\), same length and column order as X_fit.

j_treat

1-based column index of the treatment indicator in X_fit.

Value

A list with elements mean1 (standardized mean risk under \(T=1\) for everyone), mean0 (standardized mean risk under \(T=0\) for everyone), and md (mean1 - mean0, the standardized risk difference).

See also

gcomp_fractional_logit_point_estimate_cpp for the full documentation of the underlying computation.