Re: [R] scaling problems in "optim"

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Sun, 23 Mar 2008 11:35:11 +0100

kathie wrote:
> Dear R users,
>
> I am trying to figure out the control parameter in "optim," especially,
> "fnscale" and "parscale."
>
> In the R docu.,
>
> ------------------------------------------------------
> fnscale
>
> An overall scaling to be applied to the value of fn and gr during
> optimization. If negative, turns the problem into a maximization problem.
> Optimization is performed on fn(par)/fnscale.

>
> 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.
> ------------------------------------------------------
>
> I cannot understand these two statements.

>
> "Optimization is performed on fn(par)/fnscale." and
>
> "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."
>
> Would you please explain these things?

>
> Thank you in advance.
>
> Kathryn Lord
>
>
>
>
>
Well, the gist is that optim is happiest when the function values f(beta) are not too large and not too small, and ditto for df/dbeta. You may e.g. get convergence issues if your data or your "covariates" are Molar concentrations when the actual values are on the order of microMolar. "Covariates" in quotes because this is not linear, but the gradient df/dbeta plays the part in the local linearization. So you get the opportunity to rescale function values and parameters.

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 23 Mar 2008 - 10:38:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 23 Mar 2008 - 11:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive