mikewlcheung/metasem

tssem1 limits maximum dimensions to 120?

JohnMCMa opened this issue · 6 comments

>dim (test.colrel.matrix.PD)
[1] 230 230
>dim (test.colrel.matrix.idealized.PD)
[1] 230 230
tssem1FEM(my.df = list (test = test.colrel.matrix.PD, ctrl = test.colrel.matrix.idealized.PD), n = rep (10000,2))
<simpleError: The free parameter 's1211' has been assigned multiple starting values! See matrix 'S' at location (12, 11) and matrix 'S' at location (121, 1) If you want to randomly select one of these values, call model <- omxAssignFirstParameters(model) before running again.>
<simpleError: The free parameter 's1211' has been assigned multiple starting values! See matrix 'S' at location (12, 11) and matrix 'S' at location (121, 1) If you want to randomly select one of these values, call model <- omxAssignFirstParameters(model) before running again.>
Warning message:
The free parameter 's1211' has been assigned multiple starting values! See matrix 'S' at location (12, 11) and matrix 'S' at location (121, 1) If you want to randomly select one of these values, call model <- omxAssignFirstParameters(model) before running again. 

I'm under the impression that the main problem is the lack of separator at line 46 of tssem1.R: ps.labels <- outer(1:no.var, 1:no.var, function(x, y) paste("s", x, y, sep = "")). But, eventually, I'm not sure why the error starts at dimension 120 but not earlier (for example at s1112)? Is that a limitation of OpenMx?

I have just noticed this issue. Could you please send me a sample dataset replicating the issue?

Dear Dr Cheung,
Certainly. I'll send you the two objects above after this weekend.

While the extensions of the following attachments is TXT, they're in fact CSVs.

I have to admit these files are a bit unusual as they're derived from correlation matrices; but I'm not sure whether it has anything to do with the issue on hand?

test.colrel.matrix.idealized.PD.txt
test.colrel.matrix.PD.txt

Thanks.

Would you mind posting the complete R code so that I can check the problems?

These two files are CSVs that can be read into R by:

test.colrel.matrix.PD <- read.csv (file="test.colrel.matrix.PD.txt", row.names=1)
test.colrel.matrix.idealized.PD<- read.csv (file="test.colrel.matrix.idealized.PD.txt", row.names=1)

The rest of the code is listed in the opening post.

Please reply if you want further details.
John

Thanks, John.

The reason why it begins with 121 variables is that the combination of the 121th variable and the 1st variable (or 1211) conflicts with the 12th variable and the 11th variable (still 1211). There is no such conflict before that. For example, 1210 can only be 12 and 10 but not 121 and 0. I have just fixed it in Github by inducing a "_" between them, e.g., "s12_10".