cjvanlissa / tidySEM

55 stars 7 forks source link

Instruction on modifying syntax #80

Closed midryoun closed 11 months ago

midryoun commented 11 months ago

Hi,

I'd like to report an instruction on the GitHub page that could be incomplete depending on circumstances.

On this page, an example was provided to illustrate how to modify syntax that combind two latent variables into one.

image

However, the provided code does not alter "free" and "ustart" values, which in turn will end up the latent variable "tex" to have two reference indicators. Usually this is not a desired modification when you combine two factors.

image

If one wants only one reference indicator on their combined factor, one should include additional code that looks like:

mutate(free = ifelse(rhs == "spe_1", 1, free), ustart = ifelse(rhs == "spe_1", NA, ustart))

It would be nice if the instruction mentions this. Thank you for a great package!

cjvanlissa commented 11 months ago

Good point, I'm on it!