-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users cannot label expected means matrix #333
Comments
I think the problem is that you labelled the row. I suggest we only compare the colnames? |
I guess it's been conventional for the row element of the dim names list to be NULL, so they don't get checked. mxMatrix("Full",1, 3, free = TRUE, dimnames = list(NULL, selVars)) Not sure if there would be side effects of ignoring non-Null row names. Might be best to say:
|
Actually, I labelled both. With either "mean" for a row name (as above) or NULL, it is not happy at all about column labels on the mean algebra. |
Oh, you're using an mxAlgebra for the mean? Hm, do we have a test for that? Can you provide an example? |
Here's an example. It appears to work: The means fix fixed the algebra double naming also... data(HS.ability.data) # load the data
Spatial = c("visual", "cubes", "paper")
m1 = umxRAM(model= "Holzinger_and_Swineford_1939", data = HS.ability.data,
umxPath(from = "vis", to = Spatial),
umxPath(v1m0 = "vis"),
umxPath(v.m. = Spatial),
mxAlgebra(name = "myMcols", M, dimnames = list(NULL, c(Spatial, "vis"))),
mxAlgebra(name = "myMboth", M, dimnames = list("means", c(Spatial, "vis")))
)
m1$expectation$M = "myMcols"
m1 = mxRun(m1)
m1$expectation$M = "myMboth"
m1 = mxRun(m1) so far so good but other functions are not happy with the M matrix being an algebra, I think? mxStandardizeRAMpaths(m1)
|
If the user correctly labels the means matrix, it generates an error. Ideally, the names and their order should be compared; if different then error, otherwise proceed.
The text was updated successfully, but these errors were encountered: