weight_cause_cox
fits the marginal structural proportional cause-specific hazards model using the inverse probability treatment weights.
weight_cause_cox(data=,
time, time2 = NULL,
Event.var, Event,
weight.type,
ties = NULL)
The dataset, output of doPS
See also Surv
, for right censored data, this is the follow up time. For interval data, the first argument is the starting time for the interval.
See also Surv
, ending time of the interval for interval censored or counting process data only. Intervals are assumed to be open on the left and closed on the right, (start, end]. For counting process data, event indicates whether an event occurred at the end of the interval.
The variable name for the event indicator which typically has at least 3 levels.
Event of interest, the rest of the event are treating as competing event.
Type of inverse probability weights. Possible values are "Unstabilized" and "Stabilized".
See also coxph
, a character string specifying the method for tie handling. If there are no tied death times all the methods are equivalent.
Returns a table containing the estimated coefficient of the treatment effect, the robust standard error of the coefficient, estimated hazard ratio and 95% CI for the hazard ratio.
The marginal structural cause-specific Cox model for cause j usually has the form:
$$ \lambda^{a}_j (t) \equiv \lambda_{T^{a},J^{a}=j}(t) = \lambda_{0j}e^{\beta*a}, $$
where \(T^{a}\), \(J^{a}\) is the counterfactural survival time and cause for treatment \(a (=0,1)\), \(\lambda_{0j}\) is the unspecified baseline cause-specific hazard for cause j, and \(\beta\) is the treatment effect.