--- On Wed, 9/12/09, raoul reulen <[email protected]> wrote:
> mi test and mi testtransform will allow me to test linear
> and non-linear hypotheses within the same model, but what if I
> wanted to compare two nested models? Essentially i have two models,
> one with a linear variable in it and the other with the same variable
> fitted but as an indicator (aka dummy) variable. By comparing the two
> models I can work out whether it is appropriate to fit the variable
> as a linear term.
If the models are nested, then there exists a contstraint that is
equivalent to the comparison of the two models, for example:
*-------------------- begin example ---------------------
sysuse auto, clear
reg price i.rep78 mpg i.foreign
test 2.rep78 = 3.rep78 / 2 = 4.rep78 / 3 = 5.rep78 / 4
*--------------------- end example ----------------------
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/