MxModel@intervals

Posted on
Picture of user. carey Joined: 10/19/2009

some old (over 1 year ago) MxModel objects that i saved are giving me the following error in R:
Error: no slot of name "intervals" for this object of class "MxModel"

if i create a new MxModel, it shows a slot for intervals of type list. but i cannot find documentation for this slot in http://openmx.psyc.virginia.edu/docs/OpenMx/latest/_static/Rdoc/MxModel-class.html (or in the doc for mxModel either).

any help?
best,
greg

Replied on Thu, 12/16/2010 - 21:03
Picture of user. mspiegel Joined: Jul 31, 2009

The old model does not have a slot for confidence intervals. I think the following will work:

newModel <- mxModel()
oldSlotNames <- slotNames(originalModel)
for(i in 1:length(oldSlotNames)) {
   slot(newModel, oldSlotNames[[i]]) <- slot(originalModel, oldSlotNames[[i]])
}

If your original model contained submodels, then you'll need to translate those as well.