Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using stcrprep under multiple imputation for fitting Fine and Gray models

    Hi all,

    I want to analyze the associations between different exposures and the risk of developing or dying from cardiovascular disease (CVD) in a large dataset.

    My "event" variable is coded as follows:
    0=incident cardiovascular disease or death by CVD
    1=death by other causes
    2= No CVD and alive
    My aim is to analyze the risk of 0, with 1 as competing event. Using "stcrreg" takes just too much time to run the models, so I'm trying to use "stcrprep" to fit Fine and Gray models using stcox, but after performing multiple imputation for missing covariates.

    I'm using the following code:
    Code:
    mi stset end_follow_up_date, failure( event ==0, 1) origin(time birth_day) enter(time baseline_date) scale(365.25) id(n_id)
    stcrprep, events(event) keep(bmi) trans(0)
    However, I get the following error after running that code:
    "Events variable (event) and event indicator (_d) do not match"
    I'm assuming it is a problem with multiple imputation. Could someone give me any tips?

    Thank you.
Working...
X