Closed MarkHuisman-jme closed 2 weeks ago
Error in vec_cast.haven_labelled.haven_labelled():
The tidyverse
strikes again. This error has nothing to do with lavaan.mi
. It involves the "labelled"
class, which for some reason does not inherit from class "factor"
(probably because the former does not necessitate all values to belong to one of the labeled categories?). If you open its help page in the haven
documentation, Hadley's description says "I expect you’ll coerce to a standard R class (e.g. as_factor()
) soon after importing".
Any idea how to solve this?
You can convert tidyverse to normal R objects when you go anywhere outside the tidyverse, as Hadley's philosophy only prioritizes internal consistency. For example, turn a tbl
into a data.frame
, a labelled
vector into a factor
vector, etc.
Hello,
I am estimating a latent change model (one latent variable on two time points, with five indicators) on an imputed data set (for testing purposes only m=10 imputations). The model fits on each imputed data set separately, and the sem.mi() function also works. It give parameters estimates:
parameterEstimates.mi(mod1_imp_fit, fmi = T)
Using fitMeasures(mod1_imp_fit) gives and error, however:
Any idea how to solve this?