Whilst trying to plot a model, I get the following error
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
I get this error only in the following combination (both conditions must be present):
Condition 1: When the sem(fit, df, ordered=c("X1", "X2"...)) is instructed to treat specific variables as ordered.
Condition 2: When in the semPaths command I want to use my own matrix than the standard one provided by the software.
With my data, when I remove either ordered=, or when use one of the predefined layouts (tree, circle, etc.), I do not get the above problem.
I do not wish to burden you with my data or code, so below is an example which reproduces the result (The example, not my data, creates a problem when I don't define specific variables as ordered, but hopefully the below example is helpful).
Dear Sacha,
Whilst trying to plot a model, I get the following error
I get this error only in the following combination (both conditions must be present): Condition 1: When the sem(fit, df, ordered=c("X1", "X2"...)) is instructed to treat specific variables as ordered. Condition 2: When in the semPaths command I want to use my own matrix than the standard one provided by the software.
With my data, when I remove either ordered=, or when use one of the predefined layouts (tree, circle, etc.), I do not get the above problem.
I do not wish to burden you with my data or code, so below is an example which reproduces the result (The example, not my data, creates a problem when I don't define specific variables as ordered, but hopefully the below example is helpful).