> Date: Fri, 30 Oct 2009 09:29:06 +0100 > From: Christophe Dutang <duta...@gmail.com> > Subject: Re: [R] [R-SIG-Finance] Fast optimizer > To: R_help Help <rhelp...@gmail.com> > Cc: r-help@r-project.org >> > Ok. I have the following likelihood function. >> > >> > L <- p*dpois(x,a)*dpois(y,b+c)+(1-p)*dpois(x,a+c)*dpois(y,b) >> > >> > where I have 100 points of (x,y) and parameters c(a,b,c,p) to >> > estimate. Constraints are: >> > >> > 0 < p < 1 >> > a,b,c > 0 >> > c < a >> > c < b >> > >> > I construct a loglikelihood function out of this. First ignoring the >> > last two constraints, it takes optim with box constraint about 1-2 min >> > to estimate this. I have to estimate the MLE on about 200 rolling >> > windows. This will take very long. Is there any faster implementation? > Take a look at the CRAN task view on optimisation, you may find faster > algorithms. >
There are several new or revised methods in development as well as a new wrapper optimx() in the r-forge OptimizeR project http://r-forge.r-project.org/R/?group_id=395 In particular Rvmmin is an all-R implementation of the algorithm at the heart of optim's BFGS but with bounds and mask (fixed parameter) constraints. I'm looking into how it can be made more convenient to hot-start with suspected "good" parameters, which would be likely be important here. JN ______________________________________________ R-help@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.