You may already know this, but in case you don't get a canned solutions, I'll mention that this is an integer programming problem. If you can first get a solution that it is not an integer, then you do an exhaustive search in a neighborhood near the maximum. In one dimension, this is easy: Just check floor and ceiling and pick the winner. In multiple dimensions, this is harder, but the same principle should apply. For elegant algorithms, see the literature on integer programming.

hope this helps. spencer graves

Anon. wrote:
Moi!

I have a problem where I want to find the ML estimate of a discrete parameter. I just want a function like optim that finds the max/min value for a function. Does anyone know of such a function for R?

Thanks.

Bob


______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to