Maximum likelihood estimation can be implemented like Quasi-maximum likelihood in Matlab, You can also write an R function which computes out the likelihood function. As always in R, this can be done in several different ways.
One issue is that of restrictions upon parameters. When the search algorithm is running, it may stumble upon nonsensical values – such as a sigma below 0 – and you do need to think about this. One traditional way to deal with this is to “transform the parameter space”. As an example, for all positive values of sigma, log(sigma) ranges from -infinity to +infinity. So it’s safe to do an unconstrained search using log(sigma) as the free parameter.
For detail about methodology and sample codes see http://www.mayin.org/ajayshah/KB/R/documents/mle/mle.html.
Tags – mle
Read the full post at Maximum likelihood estimation in R.