From: Michael C. <mic...@ua...> - 2004-10-20 09:31:00
|
Hello, I've added functions for maximum likelihood estimation to the directory main/econometrics. The functions need the addition of help messages, but for now there is the script mle_example.m, which shows how to use the set of functions. The basic thing a user needs to do is define the log-likelihood function for a model using the framework function log_likelihood = my_likelihood(theta, data, otherargs) < lines to calculate log_likelihood> endfunction or optionally function [log_likelihood, score] = my_likelihood(theta, data, otherargs) < lines to calculate log_likelihood and score> endfunction In this framework: * theta is a kX1 parameter vector * data is an nXp matrix * log_likelihood is an nX1 vector of log-likelihood contributions * score is and nXk matrix of score contributions, the derivatives of the rows of log_likelihood w.r.t the transpose of theta Otherargs is whatever else is needed to calculate the likelihood function. It may be an empty place holder. Comments welcome. I'm planning to add similar functions for GMM estimation soon. Michael |