1

I need to calculate the log-likelihood of a linear regression model in Matlab (I don't have the newer mle function unfortunately).

I realize that the parameters are the same as ordinary least squares (at least asymptotically), but it's the actual log-likelihood value that I need.

Although the theoretical result is well know and given in several sources, I'd like to find a pre-existing implementation so that I can be confident that it's tried and tested.

The problem is I have no numerical examples against which I can validate my own implementation.

Failing that, if someone can point me to a numerical example of a loglihood calculation for a linear regression model with N(0,sigma I) errors that would be great too. It's easy enough to program, but I can't really trust it unless its been tested.

4

0 に答える 0