Look at optim, or mle in package stats4.
There are a lot of similar problems addressed in R: few real-world
likelihoods have `an explicit formula'. One quite similar example is
ARIMA fitting.
On Thu, 19 Jan 2006, Dominik Heinzmann wrote:
> Dear R-users
>
> Problem:
>
> Given the following system of ordinary differential euqations
>
> dM/dt = (-n)*M-h*M
> dS/dt = n*M-h*S+u*R
> dA/dt = h*S-q*A
> dI/dt = q*A-p*I
> dJ/dt = h*M-v*J
> dR/dt=p*I+v*J-u*R
>
> where M,S,A,I,J,R are state variables and n,h,u,q,p,v parameters.
>
> I'm able to calculate the likelihood value based on the solutions
> M,S,A,I,J,R of the ODE's given the data, but without an explicit
formula.
>
> How can I now optimize the loglikelihood with respect to the parameter
> n,h,u,q,p,v? Is there any functions available in R for dealing with such
> empirical likelihood problems?
>
> Thanks a lot for your support.
>
> --
> Dominik Heinzmann
> Master of Science in Mathematics, EPFL
> Ph.D. student in Biostatistics
> Institute of Mathematics
> University of Zurich
>
> Winterthurerstrasse 190
> CH-8057 Z?rich
> Office: Y36L90
>
> E-Mail : dominik.heinzmann at math.unizh.ch
> Phone : +41-(0)44-635 5858
> Fax : +41-(0)1-63 55705
> Homepage: http://www.math.unizh.ch/user/heinzmann
>
> ______________________________________________
> R-help at 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
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595