You are here

"saving" the score/information functions

2 posts / 0 new
Last post
stueller's picture
Offline
Joined: 08/04/2009 - 16:14
"saving" the score/information functions

First of all I want to say that OpenMx has been quite straightforward to start using given the documentation on this website.

I am interested in being able to use the score function directly and wonder whether this is feasible in OpenMx. For example, I might want to fit a unidimensional CFA and then to plug subject 23's data and the parameter estimates into the score function. One application of this is to examine the sensitivity of a result. I might want to plug in several different values for the estimate of, say, the factor variance while holding the other parameter estimates constant. A similar thing might be done with the information function.

That said, I realize that the optimization is being done numerically and not analytically. So I'm not sure whether "saving" the score or information function for a given model is straightforward to do.

Steve's picture
Offline
Joined: 07/30/2009 - 14:03
I'm not sure to which score

I'm not sure to which score function you refer.

If what you want to do is to hold all the estimates constant and then try plugging in values for one of the estimated vales and see how the -2LL changes, you would want to copy the output of your original mxRun to a new variable name

out1 <- mxRun(fooModel)
barModel <- fooModel

Then fix the parameters of barModel for all of the parameters you want to hold constant. Now you can change one parameter (say a factor variance) to a new value and resubmit the model to mxRun(). A new -2LL will be calculated.

Or maybe I didn't understand the question.