The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

avik23 (2) [Avatar] Offline
#1
Hi,
I have few questions regarding chap 16.
You provided code to do multiple imputation:
library(mice)
data(sleep, package="VIM")
imp <- mice(sleep, seed=1234)
fit <- with(imp,lm(Dream ~ Span + Gest))
pooled <- pool(fit)
summary(pooled)
Following are my questions:
1. I would like to perform this procedure for some of the variables with missing values but not for all of them. How can I do it?
2 How can force R to fill the missing values with variables that I choose?
3 I would like to perfom COX regression based on the imputed files same as you perform with the "with" function in the above code. How can I do it?
I would greatly appreciate your help.
Thank you, Victoria