I am using the mice package on R to impute missing values for questionnaire, and and I want to find the polychoric correlation matrix so that I can do analysis on it (e.g. alpha, EFA).
I'm not sure how to specify this in the analysis step (with()).
Here is a min reproducible example using the bfi dataset from the psych package:
library(psych)
library(tidyverse)
data <- bfi %>%
select(-c(gender, education, age))
# The analysis I want to do (demonstrating on original data set with missing data)
polychoric(data)$rho
# The imputation bit
imp <- mice(data)
# Trying to do the analysis on the imputed datasets
cor <- with(imp, ???) # Not sure how to put in the polychoric function here