Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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

*
*   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/



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