You are here

warning 1: In `$.data.frame`(params, lbound) : Name partially matched in data frame

In packageVersion("OpenMx") # [1] ‘999.0.0.3474’
summary on this model (and others) dumps a warning message and leaves fit statistics empty. the warning on summary() is:

Warning messages:
1: In $.data.frame(params, lbound) :
Name partially matched in data frame
2: In $.data.frame(params, ubound) :
Name partially matched in data frame

v1_6 = paste0("v",1:6) # [1] "v1" "v2" "v3" "v4" "v5" "v6"
x1_2 = c("x1", "x2")

covData <- matrix(nrow=6, ncol=6, byrow=TRUE, dimnames=list(v1_6, v1_6),
data = c(0.9223099, 0.1862938, 0.4374359, 0.8959973, 0.9928430, 0.5320662,
0.1862938, 0.2889364, 0.3927790, 0.3321639, 0.3371594, 0.4476898,
0.4374359, 0.3927790, 1.0069552, 0.6918755, 0.7482155, 0.9013952,
0.8959973, 0.3321639, 0.6918755, 1.8059956, 1.6142005, 0.8040448,
0.9928430, 0.3371594, 0.7482155, 1.6142005, 1.9223567, 0.8777786,
0.5320662, 0.4476898, 0.9013952, 0.8040448, 0.8777786, 1.3997558))

m1 <- mxModel(model = "exampleModel",
# Create LISREL matrices
mxMatrix(name="TD", "Diag", nrow=6, ncol=6, values = rep(.2, 6) , free=T, dimnames = list(v1_6, v1_6)),
mxMatrix(name="PH", "Symm", nrow=2, ncol=2, values = c(1, .3, 1), free=c(F, T, F), dimnames = list(x1_2, x1_2)),
mxMatrix(name="LX", "Full", nrow=6, ncol=2, values = c(.5, .6, .8, rep(0,6), .4, .7, .5), free = c(T,T,T, rep(F, 6),T,T,T), dimnames = list(v1_6, x1_2)),
# Create a LISREL objective with LX, TD, and PH matrix names
mxExpectationLISREL(LX = "LX", TD = "TD", PH = "PH"),
mxData(covData, type = "cov", numObs = 100)
)
m1 <- mxRun(m1)
summary(m1)

Reporter: 
Created: 
Fri, 05/30/2014 - 19:45
Updated: 
Wed, 07/16/2014 - 11:25

Comments

I don't see the warning, but what I notice is that there is no fit function.

If you add mxFitFunctionML() to the model then it obtains parameter estimates.

I suppose we should complain if there is no fitfunction given?

Should catch this in mxRun then?

Yep, definitely a runtime error. Question, does every mxModel need a fitFunction, or is it just a top-level or 'at least one' mxModel requirement?

According to the documentation, an instance of the MxModel class has 0 or 1 fit functions. We had talked previously about models with expectations, but not fits or data, as ways of generating data that match a model.

Oh, this this actually crashes R on my Windows machine.

See SVN 3521. I'm not sure if this the best check, but it catches the problem reported here.

Now we catch "running a model without a fit function" as an error.