Skip to content
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

Case when umxAlgebra fails #199

Open
lf-araujo opened this issue Jun 24, 2022 · 1 comment
Open

Case when umxAlgebra fails #199

lf-araujo opened this issue Jun 24, 2022 · 1 comment

Comments

@lf-araujo
Copy link
Contributor

Dear Tim,

I tried to find the culprit myself, but failed. There is a situation where umxAlgebra is failing:

regModel     <- mxModel("Regression101",
  mxData(observed = Twins2a_1, type = "raw"),
  umxMatrix("residualVar", type = "Full", nrow = 1, ncol = 1, free = TRUE, 
                          values = 10, labels = 'resid'),
  umxMatrix("Intercept", type="Full", nrow=1, ncol=1, free=TRUE, values=50,
                labels="beta0T1"),
  umxMatrix("bSite", type = "Full", nrow=1, ncol=1, free=TRUE, values=1,
                labels="beta1T1"),
  umxMatrix("Site", type="Full", nrow=1, ncol=1, free=FALSE,
               labels="data.Site_T1"),
  mxAlgebra(name = "regress", Intercept + bSite%x%Site),
  mxExpectationNormal(covariance="residualVar", 
                                    means="regress",
                                    dimnames=depVar ),
  mxFitFunctionML())

In the case above the model runs as expected, however when changing the line:

  umxAlgebra(name = "regress", Intercept + bSite%x%Site),

Then I get:

Error: Unknown reference 'expression' detected in the entity 'regress' in model 'Regression101'

@tbates
Copy link
Owner

tbates commented Jun 25, 2022

I never got umxAlgebra working: something non-transparent happens that breaks passing the expression parameter to mxAlgebra - the word expression gets interpreted and broken.... I think mxAlgebra is doing things in a non-standard way, and I could not find a way via expression or match.call or do.call to get it passed along...

I thought I had added a "don't use help" message,: added now.

Happy to solve this with you, but unless the OpenMx people can suggest sometthing: probably should just delete the function :-( ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants