Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: LLR test with regress

From   Christopher F Baum <>
Subject   st: Re: LLR test with regress
Date   Sun, 28 Dec 2003 20:05:35 -0500

On Dec 28, 2003, at 2:33 AM, Richard wrote:

Anyway, I think you could do something like the following, using the -est-
and -lrtest- commands. The idea is you run the unconstrained model and
store the results. Then, you create a new var which is the sum of the 2
vars you want to constrain to be equal. Then, run a 2nd regression using
this new var instead of the 2 original vars; this is the constrained
model. Then run lrtest to see whether the difference between constrained
and unconstrained is significant. Somebody can correct me if I am doing
this wrong or let us know if there is a better alternative. (I'm using
Stata 8 here.)
An alternative that does not require you to do any transformation of the data:

webuse auto
constr def 1 price=weight
cnsreg mpg price weight, c(1)
est store constr
reg mpg price weight
lrtest constr, force


* For searches and help try:

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