Skip to content
Prev 58387 / 398502 Next

integer

Yes, it is possible -- there are two steps:

1)  Create a suitable function.  This is likely to look something like:

f.wrapper <- function(pars)
{
    ipars <- round(pars)
    f(ipars[1], ipars[2], ipars[3])
}

2) Find a suitable optimizer. 

A genetic algorithm, as you alluded to earlier, is a likely choice. 
Choices include "genopt" from S Poetry (you can extract "genopt"
and "genopt.control" from the shar file).

Another possibility is simulated annealing which is available via
the "optim" function.

Patrick Burns

Burns Statistics
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Ludovic Tambour wrote: