[R] optim with specific constraints on possible values

From: Camarda, Carlo Giovanni <Camarda_at_demogr.mpg.de>
Date: Wed 17 May 2006 - 05:08:38 EST

Dear R-users,

I am working with some grid-search optimization for 13 values of an object function.

At glance one may compute the object function for each possible combination of set of parameters, but in my case would not be feasible: taking for example 13 possible values for each parameters like, in logarithm scale, 10^seq(-3,3,.5) will lead to 13^13 combinations of results.

As a second trial I use the general-purpose function "optim" both without and with constraints from the candidate values (of course the latter is fast and fine with me), but I am wondering whether there is kind of optim-function which optimize using only a series of values to give as additional arguments. Just inventing, something like:

possible1 <- 10^seq(-3,3,0.5)
possible2 <- 10^seq(-3,3,0.5)
possible13 <- 10^seq(-3,3,0.5)

new.optim(par=rep(median(possible1), 13),

          from=cbind(possible1, possible2,..., possible13)) 

Instead of just:
optim(par=rep(median(possible1), 13),

 	lower=rep(min(possible1), 13),
      upper=rep(min(possible1), 13)) 

Thanks in advance,
Carlo Giovanni Camarda

Camarda Carlo Giovanni
Max Planck Institute for Demographic Research Konrad-Zuse-Strasse 1
18057 Rostock, Germany
Tel: +49 (0)381 2081 172
Fax: +49 (0)381 2081 472


This mail has been sent through the MPI for Demographic Rese...{{dropped}}

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 17 05:17:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 20 May 2006 - 04:10:11 EST.

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