R lavaan error when standardizing observations -
I have encountered an error while trying to do the following models in the lava package for path analysis:
my.data & lt; -data.frame (A = A, C = C, D = D) my.model & lt; - "C ~ DA ~ C + D" Fit.mine & lt; -sem (my.model, data = my.data, fixed.x = FALSE, std.ov = TRUE) Produces this error:
Cov (error [exo [[g]], use = 'coupler'): Supply both 'x' and 'y' or matrix-like 'x'. The error disappears when set to Std.ov. False, but this is not ideal.
I have also tried decostand (my.data, method = "standardized") from vegetarian and when it is calculated, it produces strange result (negative AIC / BIC)
My answer was found in a user group on another forum, In case of need, I will post it here:
The above error is a bug, it only appears when the argument is std.ov = TRUE, and actually in the model 1 x The variable is variable.
The workaround in Lavaian version 0.5-17 has to standardize your variable before analysis.
This bug is fixed at 0.5-18.772.
Comments
Post a Comment