0
$\begingroup$

I need to run a survival analysis and use environmental data containing missing values. The environmental data are per day, and I actually want to use the mean of each variable during (let's say) the 10 days prior an event before running a cox model. So that I can take into account the environmental situation and assign one value to each individual. How can I handle missing values in such a case?

From many readings, here (such as 1, 2 or 3) and on several stat websites on missing data, multiple imputation would be a suitable method. It is also mentioned in previous articles in my field, but without details on how they implemented that before running a cox model. I am also open to other ideas. The MICE package in R seems a good fit for that. However, it is my understanding that such methods generates several data sets with imputed values, that all the imputed data should then be used in the model, and that the results can then be pooled. Here, how can I "pool" or build one dataset on which I can perform the mean and then use that data set into the cox model? Should I calculate the mean for each imputed data set, and use them in the cox model? Is there a way to "extract" one data set based on the imputed data sets and then take the mean? Other options/best practice ideas/tips on the coding part as well? Thanks!

$\endgroup$

1 Answer 1

0
$\begingroup$

Here, how can I "pool" or build one dataset on which I can perform the mean and then use that data set into the cox model?

The way to proceed isn't to pool the datasets, it's to pool the model results. If you have 20 imputed data sets, you do 20 separate Cox models. Each Cox model uses the 10-day-average covariate values for the corresponding data set. Then you average the results of interest among the 20 Cox models, with error estimates that include both within-imputation and among-imputation variances. See Stef van Buuren's book for details.

$\endgroup$
2
  • $\begingroup$ Thanks for your answer. So even if I work on averages or something else, all the imputed data should then be used in the model like for any other model. There are several examples of code in R to average the results of imputed data among several linear model. But do you know if it is also working with the survival package in R? Can I use the "pool" function as well? I $\endgroup$
    – Mata
    Nov 22, 2021 at 8:46
  • $\begingroup$ @Mata survival models provided early motivation for development of multiple imputation. According to the mice manual, you can use pool() provided that the function can access the estimates from each model, the standard errors of those estimates, and the residual degrees of freedom. If you are interested in usual regression coefficients that should be straightforward with Cox models. Otherwise, you might have to do some coding so that the broom package can identify those values from the models. $\endgroup$
    – EdM
    Nov 22, 2021 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.