You are here

Problem instantiating an MxModel object using new()

4 posts / 0 new
Last post
carey's picture
Joined: 10/19/2009 - 15:38
Problem instantiating an MxModel object using new()

again, pardon intrusions from an R neophyte.

# this works

# but this does not
thatOMxModel thatOMxModel


mspiegel's picture
Joined: 07/31/2009 - 15:24
Ah. The problems occurs

Ah. The problems occurs because thatOMxModel has a name argument of character(). Until recently there was an implicit restriction that named entities could not have a name of length 0. This restriction was made explicit in subversion revision 987. We recommend using the mxModel, mxAlgebra, mxMatrix, etc. interface functions instead using the S4 constructors directory. The constructors do not perform any error checking.

carey's picture
Joined: 10/19/2009 - 15:38
thanks, that explains it,

that explains it, although i am clueless as to what subversion revision 987 means.

i can see user problems, however, with the interface between R and OpenMx when ordinary R functions give inconsistencies from mxXXX functions which, in turn can give inconsistencies within themselves. consider the "name argument" mentioned above above. try

A A@name
D D@name

tbates's picture
Joined: 07/31/2009 - 14:25
"subversion revision 987"

"subversion revision 987" refers to the build (# 987) of OpenMx in which this was fixed.

this line

is saying "make a new model with name "B" and name "C" "

Perhaps that should throw an error, but I am not sure many people will try and do that: You only pass a string in as the first parameter to set the name of the new model, you only use name to create a new name when the first parameter was a base model being passed in.

Log in or register to post comments