R/binomial.regression.R
binregG.Rd
Computes G-estimator $$ \hat F(t,A=a) = n^{-1} \sum_i \hat F(t,A=a,Z_i) $$. Assumes that the first covariate is $A$. Gives influence functions of these risk estimates and SE's are based on these. If first covariate is a factor then all contrast are computed, and if continuous then considered covariate values are given by Avalues.
binregG(x, data, Avalues = c(0, 1), varname = NULL)
phreg or cifreg object
data frame for risk averaging
values to compare for first covariate A
if given then averages for this variable, default is first variable
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)
#> risk:
#> Estimate Std.Err 2.5% 97.5% P-value
#> risk0 0.4062 0.02578 0.3556 0.4567 6.476e-56
#> risk1 0.5080 0.03720 0.4351 0.5809 1.876e-42
#> risk2 0.6090 0.05570 0.4998 0.7182 7.937e-28
#>
#> Average Treatment effects (G-estimator) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> p1 0.1018 0.02616 0.05054 0.1531 9.932e-05
#> p2 0.2028 0.04977 0.10525 0.3004 4.610e-05
#>
#> Average Treatment effect ratio (G-estimator) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> [p1] 1.250652 0.06593275 1.121427 1.379878 1.43743e-04
#> [p2] 1.499309 0.12705262 1.250291 1.748328 8.49673e-05
#>