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)

Arguments

x

phreg or cifreg object

data

data frame for risk averaging

Avalues

values to compare for first covariate A

varname

if given then averages for this variable, default is first variable

Author

Thomas Scheike

Examples


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.4058 0.02591 0.3551 0.4566 2.781e-55
#> risk1   0.5120 0.03707 0.4393 0.5846 2.182e-43
#> risk2   0.6169 0.05516 0.5087 0.7250 4.959e-29
#> 
#> Average Treatment effects (G-estimator) :
#>    Estimate Std.Err    2.5%  97.5%   P-value
#> p1   0.1061 0.02623 0.05471 0.1575 5.222e-05
#> p2   0.2110 0.04960 0.11380 0.3082 2.097e-05
#> 
#> Average Treatment effect risk-ratio (G-estimator) :
#>      Estimate    Std.Err     2.5%    97.5%      P-value
#> [p1] 1.261479 0.06658449 1.130976 1.391982 8.600203e-05
#> [p2] 1.519945 0.12774846 1.269563 1.770327 4.699946e-05
#> 
#> Average Treatment effect (1-risk=survival)-ratio (G-estimator) :
#> NULL
#>