Computes the G-estimator (G-formula) for standardized risk estimates based on a
fitted binreg object. The G-estimator standardizes predictions over the
covariate distribution in the data:
$$ \hat F(t, A=a) = n^{-1} \sum_{i=1}^n \hat F(t, A=a, Z_i) $$
binregG(x, data, Avalues = NULL, varname = NULL)An object of class "survivalG" containing:
A table of standardized risk estimates for each value of Avalues.
Influence functions for the standardized risk estimates.
Pairwise differences in risks between levels of A.
Risk ratios between levels of A.
Variance-covariance matrix of the risk estimates.
The link function used in the original model.
An object of class "binreg" obtained from binreg() or logitIPCW().
A data frame containing the covariates to be used for averaging the risk estimates. This should ideally be the same data used to fit the model, or a representative sample.
Numeric or factor vector specifying the values of the first covariate (\(A\)) for which to compute standardized risks.
If the first covariate is a factor and Avalues is NULL,
all levels of the factor are used.
If the first covariate is continuous, Avalues must be provided.
Optional character string specifying the name of the variable to be
treated as the treatment/exposure variable. If NULL, the first variable
in the model formula is used.
Thomas Scheike
This function assumes that the first covariate in the original model formula represents the treatment or exposure variable (\(A\)). It calculates the marginal risk for specified values of \(A\) by averaging the conditional predictions over the observed covariate distribution \(Z\).
The function returns influence functions for these risk estimates, allowing for the computation of standard errors and confidence intervals.
If the first covariate is a factor, contrasts between all levels are computed
automatically. If it is continuous, specific values must be provided via
Avalues.
Blanche PF, Holt A, Scheike T (2022). "On logistic regression with right censored data, with or without competing risks, and its use for estimating treatment effects." Lifetime Data Analysis, 29, 441–482.
binreg, binregATE
data(bmt); bmt$time <- bmt$time+runif(408)*0.001
bmt$event <- (bmt$cause!=0)*1
b1 <- binreg(Event(time,cause)~age+tcell+platelet,bmt,cause=1,time=50)
sb1 <- binregG(b1,bmt,Avalues=c(0,1,2))
summary(sb1)
Run the code above in your browser using DataLab