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!