[R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Ian McPhail
Hello, I am looking for some advice on how to select subsets of variables for imputing when using the mice package. >From Van Buuren's original mice paper, I see that selecting variables to be 'skipped' in an imputation can be written as: ini <- mice(nhanes2, maxit = 0, print = FALSE) pred <- in

[R] Error in mice package when trying to use subset of variables for imputation model

2020-07-21 Thread Ian McPhail
, 0), TSHS_33R = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c(NA, -10L), class = c("tbl_df", "tbl", "data.frame")) > rstudioapi::versionInfo() $`citation` To cite RStudio in publications use: RStudio Team (2018). RStudio: Integrated Development for R. RS

[R] Computing tetrachoric covariance matrices for multiple imputed datasets using MICE package

2020-04-24 Thread Ian McPhail
Using the mice package, I have created multiple imputed datasets to deal with missing data. I am looking for an example of the R code to use in order to analyze the set of imputed datasets using tetrachoric correlations in such a way that after pooling, I will have a combined tetrachoric covariance