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-variance matrix to use as input for an exploratory factor analysis. I have taken a few attempts at the with() command in the mice package, using the poly() function, but do not quite know what I'm doing so am out of my depth with the R code. All of the examples for using the with() command in the mice package involve lm() and regression formula.
For example, using an example with only 3 variables, I have attempted the following code,
imp<- mice(df, meth = pmm, m = 25)
fit <- with(imp, poly(var1, var2, var3))
Alternatively, I have tried:
imp<- mice(df, meth = pmm, m = 25)
fit <- with(imp, poly(var1:var3))
Alternatively, I have tried:
imp<- mice(df, meth = pmm, m = 25)
fit <- with(imp, poly(imp))
I have attempted the same series of code, but using the polychoric() function in the psych package.
The data I am working with are 22 scale items that have a yes/no response type. I am not very savvy with R, but I appreciate any help people are able to provide.
tia,
Ian