Skip to content
Back to formatted view

Raw Message

Message-ID: <x264yitptr.fsf@turmalin.kubism.ku.dk>
Date: 2005-04-19T21:32:48Z
From: Peter Dalgaard
Subject: Optim(...parscale...)
In-Reply-To: <20050419143712.74704.qmail@web61201.mail.yahoo.com>

Werner Bier <aliscla at yahoo.com> writes:

> Hi there,
>  
> The optim(par, fn, ...parscale...) function in R requires 'parscale' which is defined as:
>  
> "A vector of scaling values for the parameters. Optimisation is performed on 'par/parscale' and these should be comparable in the sense that a unit change in any element (??) produces a unit change in the scaled value".
>  
> I am just not understanding the "comparable...produces".
>  
> Should we compare "fn(par/parscale+1)- fn(par/parscale)" with 
> "fn(parscale+1) - fn(parscale)"? 
>  
> With this respect, we might refer to the choice of parscale=20 in the "wild function" given in the optim R documentation if you wish.
>  
> Many thanks in advance for your consideration.

You need to take a more pragmatic view. All that the help page is
trying to say is that you have a problem if realistic values for one
parameter are on the order of 0.0001-0.0010 while another parameter
varies in the thousands. This tends to cause convergence issues, and
parscale is there to bring the variables closer to a common scale. In
my experience, getting the scales right within a factor of 100 or so
is usually sufficient.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907