Replies: 1 comment 1 reply
-
If the relationships are truly deterministic, I believe this could be resolved with post-processing: https://www.gerkovink.com/miceVignettes/Passive_Post_processing/Passive_imputation_post_processing.html |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear all,
I am new to MICE and I tried to impute a dataframe consist of medical information, the dataframe is listed below:
dat <- data.frame(gender=c(1,2,1,2,1,2,1,2,1,2,1), age=c(33,29,22,27,31,32,25,28,26,26,24), height=c(183,NA,175,161,177,NA,160,166,172,186,169), weight=c(83,71,75,NA,77,85,73,66,NA,74,72), BMI=c(24.74,NA,24.49,NA,24.61,NA,28.49,23.91,NA,21.29,25.33), IGF1=c(132,140,NA,116,129,150,128,120,128,NA,234), IGF1_SDS=c(-1.214,-1.782,NA,-2.874,-1.412,-1.125,-1.902,-2.620,-1.783,NA,0.139))
I tried to impute the BMI data using the code below (I hope it's right):
library(mice) ini<-mice(dat,maxit=0,print=FALSE) meth<-ini$method pred<-ini$predictorMatrix pred[c("height","weight"),"BMI"]<-0 meth["BMI"]<-"~I(weight*10000/height/height)" imp<-mice(dat,method = meth,predictorMatrix = pred)
However, I don't know how to deal with the IGF1_SDS, the IGF1_SDS is calculated based on the IGF1 value. The problem is, there is no universal formula to do the calculation.
IGF1_SDS = [(IGF1/M)^L -1]/(L*S)
where L, M and S are constants. For different ages and different genders, these three parameters are differernt. For example, for male age of 33, L = 0.511, M = 184, S = 0.250; for female age of 29, L = 0.140, M = 206, S = 0.212.
My question is how to impute the IGF1_SDS data? I tried the same way as to impute "BMI", but failed. Any suggestions will be highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions