[R] Control parameter of the optim( ): parscale

Ben Bolker bolker at ufl.edu
Mon Jul 21 23:04:50 CEST 2008


Zornitsa Luleva <zornitsa.luleva <at> gmail.com> writes:

> I am using the L-BFGS-B method of the mle2() function to estimate the values
> of 6 parameters. mle2 uses the methods implemented in optim. As I got it
> from the descriptions available online, one can use the parscale
> parameter to tell R somehow what the values of the estimated parameters
> should be . . .
> 
> Could somebody please help me understand what one has to do actually with
> the parscale parameter so that it works right?
> 
> I am very grateful for an answer - R leaves sometimes some of the parameters
> unchanged (it is OK since it is a feature of the L-BFGS-B algorithm), but
> often these are the parameters that should have greater values!

  I'm the author of mle2 (in the bbmle package), but as you correctly
infer your problem is with optim and not with mle2 per se.  As far
as I can tell, you're a little bit confused about the purpose of the
parscale parameter -- and I'm a little confused about what you want to
do.

 The parscale parameter is a way of telling R what the expected
sensitivity/magnitude of different parameters is likely to be.
For example, if you have two parameters that have expected values
of 1e6 and 1e-6, the optimization is likely to work much better
if you give control=list(parscale=c(1e6,1e-6)) as one of the
arguments to mle2.

  It sounds like you instead want to force some of the parameters
to have particular values.  I don't know exactly *why* you want
to do this, but you can use e.g. fixed=list(fixedpar=27) to force
one of the parameters of the function to be set rather than
optimized.

  Ben Bolker



More information about the R-help mailing list