.-
help for ^reglike^                                  Posted to statalist
14may1998
.-

Obtaining log-likelihood values for linear regression -----------------------------------------------------

^reglike^ [^,^ ^c^ommand^(^commandname^)^ ^df(^#^)^ ]

^reglike^ is run following ^regress^.

Description -----------

After running ^regress^, ^reglike^ computes the log-likelihood and puts its value into the global macro ^S_E_ll^.

The ^command()^ and ^df()^ options allow one to trick the ^lrtest^ command into working when the linear regression is nested within another maximum-likelihood estimator.

Options -------

^command(^commandname^)^ specifies the name of another ML estimation command with which you wish to use ^lrtest^. Note that using this option wipes out the saved results of ^regress^.

^df(^#^)^ specifies the "model" degrees of freedom to be used by ^lrtest^ for t > he linear regression model. This should be set to whatever number is necessary to give the right degrees of freedom for the chi-squared statistic from ^lrtest^.

Examples --------

. ^regress mpg weight displ^ . ^reglike^

. ^xtreg y x1 x2 x3, i(group) mle^ . ^lrtest, saving(0)^ . ^reg y x1 x2 x3 if group~=.^ . ^reglike, c(xtreg) df(2)^ . ^lrtest^

Author ------

Bill Sribney Stata Corporation 702 University Drive East College Station, TX 77840 Phone: 409-696-4600 800-782-8272 Fax: 409-696-4601 email: tech_support@@stata.com

Also see --------

Manual: ^[R] lrtest^ On-line: help for @lrtest@