Open Teebusch opened 5 years ago
No, I do not think so. The imputation and the EFA steps are quite independent.
Also, an option to include categorical variables would be to use correlations (e.g. polychoric, Spearman, etc.) instead of covariances. This is also relevant when the continuous response variables are not measured on the same scale.
Would it be sensible to allow to specify in
mifa.cov()
additional predictors to be used for the imputations of the response variables, but not the calculations of the covariance matrix?As an example:
The predictors will likely improve imputation of the response variables, but of course I only want to calculate covariances for the response variables. (calculating covariances for predictors might fail if they are categorical)
possible implementation
It should be possible to specify variables to remove from the imputed data, i.e. in
mia.cov()
aftercomp.mice[[i]]
has been calculated. The to-be-removed variables could be specified as an additional argument tomifa.cov()
that takes a vector of column names, column numbers or a binary mask.something like this should do the job:
I'd be happy to code this up and make a pull request for it, but I wonder if here is anything that speaks against this, from a theoretical standpoint?