tbates / umx

Making Structural Equation Modeling (SEM) in R quick & powerful
https://tbates.github.io/
45 stars 17 forks source link

plot.MxModel show definition variables (dummy latents) as diamonds #245

Closed tbates closed 7 months ago

tbates commented 7 months ago

Would this RAM model be best plotted with the groupID as a diamond labelled "groupID" instead of a circle labelled "def_groupID" ? (from #242)

m1 = umxRAM("Def Means Path Spec", data = df, 
    umxPath(v.m. = c("x","y")),
    umxPath("x", with = "y"),
    umxPath(defn="groupID"), # creates a unit latent called "def_groupID" with data "data.groupID"
    umxPath("def_groupID", to = c("x", "y"))
)
plot(m1)
image
mcneale commented 7 months ago

No. The definition variable belongs on a path, not a square, not a circle, not a triangle. I do not like defvars on variables, no sir. The revised spec with group in a square is quite wrong (no variance of groupid, etc). What should be shown on the figure is data.defvar as a label for the path from one to def_groupID. That would denote that i) it's a definition variable, and ii) it isn't necessarily the same value for everyone in the sample. The labeling of the circle doesn't change the model specification, so it's not very helpful IMO.