Skip to content
Prev 178304 / 398506 Next

Sem and nlm and ols instead of ml

Dear Adam,

ML is indeed hard-coded into the sem() function. Depending upon its
complexity, modifying the code to use a different "fitting function"
shouldn't be difficult, particularly if you are content not to supply
derivatives for the optimization. Providing for different "fitting
functions" is on my to-do list but isn't a high priority for me. On the
other hand, the task seems simple enough that I might pick it up when I have
some spare time. I'm sorry that I can't be more definite.

If you want to experiment yourself, look at the function sem.default() in
the package sources. Currently, two "fitting functions" are provided --
objective.1() and objective.2(); these are local to sem.default(). Both
implement ML, one without and the other with an analytic gradient. (I
experimented at one point with providing an analytic Hessian, but it slowed
down the optimization.)

Regards,
 John
On
two
http://www.R-project.org/posting-guide.html