Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: calculating a loglikelihood in regress

From (Roberto G. Gutierrez, StataCorp)
Subject   Re: st: calculating a loglikelihood in regress
Date   Wed, 02 May 2007 21:33:28 -0500

Dan MacNulty <> asks:

> Does anyone know if it's possible to calculate a loglikelihood value from
> regress? I tried to download and implement the command "reglike", but I was
> unsuccessful. Perhaps someone is aware of an up-to-date alternative, or can
> provide further instruction on how to use the reglike procedure. Any
> insights would be much appreciated.

-regress- saves this information in e(ll), although it does not display it.

    . sysuse auto
    . regress mpg weight 
    . display e(ll)

Of course, if you want this sort of thing displayed, you could always type

    . xtmixed mpg weight


    . xtmixed mpg weight, reml

if you want the likelihood associated with the "N-k" divided residual error, 
rather than the ML residual error, which merely divides by N.  -regress- 
gives the latter, by the way.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index