usual_illness_death_weight {semicmprskcoxmsm}R Documentation

Fit MSM Illness-death Usual Markov Model For Semi-competing Risks Data

Description

Fit the marginal structural three-state illness-death model with Cox representation and IP weights for semi-competing risks data. Inference under this model can be carried out using estimating equations with IP weights.

Usage

usual_illness_death_weight(data,X1,X2,event1,event2,w,Trt)

Arguments

data

The dataset, includes non-terminal events, terminal events as well as event indicator.

X1

Time to non-terminal event, could be censored by terminal event or lost to follow up.

X2

Time to terminal event, could be censored by lost to follow up.

event1

Event indicator for non-terminal event.

event2

Event indicator for terminal event.

w

IP weights.

Trt

Treatment variable.

Details

Let T1T_1, T2T_2 be the time to non-terminal event and terminal event, A be the treatment assignment. We postulate the semi-parametric Cox models for three transition rates in marginal structural illness-death model:

λ1(t1;a)=λ01(t)eβ1a,t1>0; \lambda_{1}(t_1 ; a) = \lambda_{01}(t)e^{\beta_1 a}, t_1 > 0 ;

λ2(t2;a)=λ02(t)eβ2a,t2>0; \lambda_{2}(t_2 ; a) = \lambda_{02}(t)e^{\beta_2 a}, t_2 > 0 ;

and

λ12(t2t1;a)=λ03(t2)eβ3a,0<t1<t2. \lambda_{12}(t_2 \mid t_1 ; a) = \lambda_{03}(t_2)e^{\beta_3 a}, 0 < t_1 < t_2 .

The coefficients as well as Breslow type baseline hazards can be estimated by fitting the IP weights Cox proportional hazards models. Meanwhile, if we assume the estimated weights as known, then the robust sandwich variance estimator can be used to obtain the estimated variance.

The usual Markov model is also the same as the initial value for the general Markov model.

Value

A list of values and dataframes:

beta1

Estimated β1\beta_1, the coefficient for the non-terminal event model.

beta2

Estimated β2\beta_2, the coefficient for the terminal event without non-terminal event model.

beta3

Estimated β3\beta_3, the coefficient for the terminal event following non-terminal event model.

sd_beta1

Model based standard error for β1\beta_1.

sd_beta2

Model based standard error for β2\beta_2.

sd_beta3

Model based standard error for β3\beta_3.

Lambda01

See also get_hazard. List of two dataframes for estimated Λ01 \Lambda_{01} and λ01 \lambda_{01} , the estimated (cumulative) baseline hazard for the non-terminal event model.

Lambda02

List of two dataframes for estimated Λ02 \Lambda_{02} and λ02 \lambda_{02} , the estimated (cumulative) baseline hazard for the terminal event without non-terminal event model.

Lambda03

List of two dataframes for estimated Λ03 \Lambda_{03} and λ03 \lambda_{03} , the estimated (cumulative) baseline hazard for the terminal event following non-terminal event model.

Examples

n <- 500
set.seed(1234)
Cens = runif(n,0.7,0.9)
set.seed(1234)
OUT1 <- sim_cox_msm_semicmrsk(beta1 = 1,beta2 = 1,beta3 = 0.5,
                              sigma_2 = 1,
                              alpha0 = 0.5, alpha1 = 0.1, alpha2 = -0.1, alpha3 = -0.2,
                              n=n, Cens = Cens)
data_test <- OUT1$data0

## Get the PS weights
vars <- c("Z1","Z2","Z3")
ps1 <- doPS(data = data_test,
            Trt = "A",
            Trt.name = 1,
            VARS. = vars,
            logistic = TRUE,w=NULL)
w <- ps1$Data$ipw_ate_stab

### Fit the Usual Markov model
res1 <- usual_illness_death_weight(data = data_test,
                                   X1 = "X1",
                                   X2 = "X2",
                                   event1 = "delta1",
                                   event2 = "delta2",
                                   w = w,
                                   Trt = "A")
print(paste("The estimated value for beta1 is:", round(res1$beta1,5) ) )


[Package semicmprskcoxmsm version 0.2.0 Index]