You might also want to try the Nelder-Mead algorithm, nmk(), in the "dfoptim" package.  It is a better algorithm than the Nelder-Mead in optim.  It is all R code, so you might be able to modify it to fit your needs.

Ravi

Ravi Varadhan, Ph.D.
Assistant Professor
The Center on Aging and Health
Division of Geriatric Medicine & Gerontology
Johns Hopkins University
rvaradhan@jhmi.edu<mailto:rvaradhan@jhmi.edu>
410-502-2619


	[[alternative HTML version deleted]]


