Running that model dies with an error about the F matrix contains dimnames and the expectation function has dimnames.
Seems a not easy to diagnose what to do, but also wrong to fail in this case? (the bound is legal).
data(myFADataRaw, package="OpenMx")
manifests = names(myFADataRaw)
latents = c("G")
m1 <- mxModel("m1", type="RAM",
manifestVars = manifests, latentVars = latents,
mxPath(from = latents, to = manifests),
mxPath(from = manifests, arrows = 2), # manifest residuals
mxPath(from = latents, arrows = 2, free = F, values = 1), # latent fixed@1
mxPath(from = c("x1", "x2"), to = "x3", arrows = 1), # manifest causes
mxPath(from = "one", to = manifests, arrows = 1), # manifest means
mxData(myFADataRaw, type = "raw")
)
m1 = mxRun(m1)
summary(m1)$parameters[3,2:6] # 0.803
m1@matrices$A@lbound["x1", "G"] = 0 # lbound G->x1 @ 0
m1 = mxRun(m1)
# Running m1
# Error: The F matrix associated with the RAM expectation function in model 'm1' contains dimnames and the expectation function has specified dimnames
#1
I agree that this should be fixed. I'm not completely sure of the best solution. In the meantime, you have options. First, you could store the model results separately from the model spec.
m1r <- mxRun(m1)
m1@matrices$A@lbound["x1", "G"] = 0
m1r = mxRun(m1) #works fine
Second, you could clear the 'dims' before re-running.
m1 <- mxRun(m1)
m1@matrices$A@lbound["x1", "G"] = 0
m1@expectation@dims <- as.character(NA)
m1 = mxRun(m1) #works fine
Log in or register to post comments
#2
.backendDims
? This error is going to be really annoying to a lot of people, and will killmxTryHard()
's usability with some models.Log in or register to post comments
#3
Log in or register to post comments
#4
Log in or register to post comments
#5
Log in or register to post comments