[R] nlminb(Splus) vs optim(R)

Kang.Changku@epamail.epa.gov Kang.Changku at epamail.epa.gov
Tue Jan 13 19:11:02 CET 2004

Dear, R experts.

I have two program codes, one is made by Splus and the other
is made by transferring from Splus code. Because "nlminb" function
in Splus is equivalent to "optim" in R, I expected to get exactly same
result. But, sometime there is too large differece (greater than 2%)
between two outputs. I looked two help files.
According to those, in Splus, quasi-Newton method was used
with hessian or gradient option unchecked and in R, "BFGS" method
is a quasi-Newton method. Therefore, if we use "BFGS" method in R,
we are using same method to Splus. Is there another consideration
when we transferring from Splus to R? Or any suggestions or comments?

Thanks in advance.

Changku Kang
National Center for Environmental Assessment
EPA  (B211F)
919-541-0245 (fax)
Kang.Changku at epa.gov

Graduate Student
Department of Statistics, NCSU
ckang2 at stat.ncsu.edu

More information about the R-help mailing list