R/binomial.regression.R
binregATE.Rd
Under the standard causal assumptions we can estimate the average treatment effect E(Y(1) - Y(0)). We need Consistency, ignorability ( Y(1), Y(0) indep A given X), and positivity.
binregATE(
formula,
data,
cause = 1,
time = NULL,
beta = NULL,
treat.model = ~+1,
cens.model = ~+1,
offset = NULL,
weights = NULL,
cens.weights = NULL,
se = TRUE,
type = c("II", "I"),
kaplan.meier = TRUE,
cens.code = 0,
no.opt = FALSE,
method = "nr",
augmentation = NULL,
outcome = c("cif", "rmst"),
model = "exp",
Ydirect = NULL,
...
)
formula with outcome (see coxph
)
data frame
cause of interest
time of interest
starting values
logistic treatment model given covariates
only stratified cox model without covariates
offsets for partial likelihood
for score equations
censoring weights
to compute se's with IPCW adjustment, otherwise assumes that IPCW weights are known
"II" adds augmentation term, and "I" classic binomial regression
uses Kaplan-Meier for IPCW in contrast to exp(-Baseline)
gives censoring code
to not optimize
for optimization
for augment binomial regression
can do CIF regression "cif"=F(t|X), "rmst"=E( min(T, t) | X) , or E( I(epsilon==cause) ( t - mint(T,t)) ) | X) depending on the number of the number of causes.
exp or linear model for E( min(T, t) | X)=exp(X^t beta), or E( I(epsilon==cause) ( t - mint(T,t)) ) | X)=exp(X^t beta)
use this outcome Y with IPCW vesion
Additional arguments to lower level funtions
The first covariate in the specification of the competing risks regression model must be the treatment effect that is a factor. If the factor has more than two levels then it uses the mlogit for propensity score modelling. If there are no censorings this is the same as ordinary logistic regression modelling.
Estimates the ATE using the the standard binary double robust estimating equations that are IPCW censoring adjusted. Rather than binomial regression we also consider a IPCW weighted version of standard logistic regression logitIPCWATE.
data(bmt)
dfactor(bmt) <- ~.
brs <- binregATE(Event(time,cause)~tcell.f+platelet+age,bmt,time=50,cause=1,
treat.model=tcell.f~platelet+age)
summary(brs)
#>
#> n events
#> 408 160
#>
#> 408 clusters
#> coeffients:
#> Estimate Std.Err 2.5% 97.5% P-value
#> (Intercept) -0.199112 0.130982 -0.455831 0.057607 0.1285
#> tcell.f1 -0.637221 0.356617 -1.336177 0.061735 0.0740
#> platelet -0.344504 0.245974 -0.826604 0.137596 0.1613
#> age 0.437222 0.107263 0.226991 0.647454 0.0000
#>
#> exp(coeffients):
#> Estimate 2.5% 97.5%
#> (Intercept) 0.81946 0.63392 1.0593
#> tcell.f1 0.52876 0.26285 1.0637
#> platelet 0.70857 0.43753 1.1475
#> age 1.54840 1.25482 1.9107
#>
#> Average Treatment effects (G-formula) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> treat0 0.428748 0.027511 0.374828 0.482668 0.0000
#> treat1 0.289931 0.065905 0.160761 0.419102 0.0000
#> treat:1-0 -0.138817 0.071772 -0.279487 0.001854 0.0531
#>
#> Average Treatment effects (double robust) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> treat0 0.428344 0.027643 0.374165 0.482523 0.0000
#> treat1 0.254841 0.064224 0.128964 0.380718 0.0001
#> treat:1-0 -0.173503 0.069680 -0.310073 -0.036933 0.0128
#>
#>
brsi <- binregATE(Event(time,cause)~tcell.f+tcell.f*platelet+tcell.f*age,bmt,time=50,cause=1,
treat.model=tcell.f~platelet+age)
summary(brsi)
#>
#> n events
#> 408 160
#>
#> 408 clusters
#> coeffients:
#> Estimate Std.Err 2.5% 97.5% P-value
#> (Intercept) -0.161478 0.133240 -0.422623 0.099667 0.2255
#> tcell.f1 -1.029704 0.513385 -2.035920 -0.023489 0.0449
#> platelet -0.490119 0.270795 -1.020867 0.040630 0.0703
#> age 0.445946 0.112205 0.226028 0.665864 0.0001
#> tcell.f1:platelet 0.956586 0.694975 -0.405540 2.318713 0.1687
#> tcell.f1:age -0.154714 0.427213 -0.992036 0.682609 0.7172
#>
#> exp(coeffients):
#> Estimate 2.5% 97.5%
#> (Intercept) 0.85089 0.65533 1.1048
#> tcell.f1 0.35711 0.13056 0.9768
#> platelet 0.61255 0.36028 1.0415
#> age 1.56197 1.25361 1.9462
#> tcell.f1:platelet 2.60280 0.66662 10.1626
#> tcell.f1:age 0.85666 0.37082 1.9790
#>
#> Average Treatment effects (G-formula) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> treat0 0.427718 0.027557 0.373706 0.481729 0.0000
#> treat1 0.265587 0.069738 0.128903 0.402272 0.0001
#> treat:1-0 -0.162130 0.074795 -0.308726 -0.015535 0.0302
#>
#> Average Treatment effects (double robust) :
#> Estimate Std.Err 2.5% 97.5% P-value
#> treat0 0.428319 0.027644 0.374137 0.482501 0.0000
#> treat1 0.257520 0.066230 0.127711 0.387329 0.0001
#> treat:1-0 -0.170799 0.071580 -0.311093 -0.030505 0.0170
#>
#>