Dear R users,

I am running a maximum likelihood model with optim. I chose the simulated annealing method (method="SANN").

SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter.

The help sais:
`parscale' A vector of scaling values for the parameters.
          Optimization is performed on `par/parscale' and these should
          be comparable in the sense that a unit change in any element
          produces about a unit change in the scaled value.

Since I know the approximate optimal parameters of the function to optimise I could use these values to calculate `parscale'.
If I understand the role of `parscale' well, I have to differentiate my function numerically.


How can I perform the numerical differentiation in R? I thought about writing a small function, but I am sure it is already written. It must be present at least in some of the optimisation algorithms.
Anyway, I couln't find it neither in the help, nor in the non-internal, displayable source of optim.


Could anyone tell me where to find such a function?
And if it really is what I need for `parscale'?

Thank you!

Gábor
--
Gabor BORGULYA MD MSc
Semmelweis University of Budapest, 2nd Dept of Paediatrics
Hungarian Paediatric Cancer Registry
phone: +36 - 1 - 4591500 / 2834

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to