Fits Cox model with treatment weights $$ w(A)= \sum_a I(A=a)/P(A=a|X) $$, computes standard errors via influence functions that are returned as the IID argument. Propensity scores are fitted using either logistic regression (glm) or the multinomial model (mlogit) when more than two categories for treatment. The treatment needs to be a factor and is identified on the rhs of the "treat.model".

phreg_IPTW(
  formula,
  data,
  treat.model = NULL,
  weight.var = NULL,
  weights = NULL,
  estpr = 1,
  pi0 = 0.5,
  ...
)

Arguments

formula

for phreg

data

data frame for risk averaging

treat.model

propensity score model (binary or multinomial)

weight.var

a 1/0 variable that indicates when propensity score is computed over time

weights

may be given, and then uses weights*w(A) as the weights

estpr

to estimate propensity scores and get infuence function contribution to uncertainty

pi0

fixed simple weights

...

arguments for phreg call

Details

Also works with cluster argument. Time-dependent propensity score weights can also be computed when weight.var is 1 and then at time of 2nd treatment (A_1) uses weights w_0(A_0) * w_1(A_1) where A_0 is first treatment.

Author

Thomas Scheike

Examples


data <- mets:::simLT(0.7,100,beta=0.3,betac=0,ce=1,betao=0.3)
dfactor(data) <- Z.f~Z
out <- phreg_IPTW(Surv(time,status)~Z.f,data=data,treat.model=Z.f~X)
summary(out)
#> 
#>    n events
#>  100     47
#> coeffients:
#>      Estimate     S.E.  dU^-1/2 P-value
#> Z.f1 -0.24887  0.26446  0.20875  0.3467
#> 
#> exp(coeffients):
#>      Estimate    2.5%  97.5%
#> Z.f1  0.77968 0.46431 1.3093
#> 
#>