--- gloria mejia <[email protected]> wrote:
> I need to compare nested models (with interaction term: 2*3 levels,
> and without interaction term) using survey data. Is there an
> equivalent to lrtest? I've read that I can use suest and test but I
> don't understand how to do it.
This is done using -test-. What you need to do is to find the
constraints that are imposed in the constrained model. In this case,
you want to test whether you can force the coefficients of the
interaction terms to be zero, so they drop out of the model:
*------------- begin example ---------------------
sysuse auto, clear
recode rep78 1/2 = 3
gen byte med_rep = rep78 == 4 if rep78 < .
gen byte hi_rep = rep78 == 5 if rep78 < .
gen med_repXfor = med_rep*foreign
gen hi_repXfor = hi_rep*foreign
reg price med_rep hi_rep foreign med_repXfor hi_repXfor
test med_repXfor = hi_repXfor = 0
*---------------- end example ---------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/