Maarten Buis replied to Kelly Richardson:
> yes, with the -test- command, see example:
>
> *------------ begin example --------------
> sysuse auto, clear
> recode rep78 1/2=3
> xi: reg price i.foreign*i.rep78
> test _Irep78_4 = _Irep78_5 = 0
> test _IforXrep_1_4 = _IforXrep_1_5 = 0
> *------------- end example ---------------
Yes, but don't forget that you need to include _all_ the constituent
variables along with the interactions in order to obtain both the correct
parameter values and the p-values, otherwise you assume -foreign- and
-rep78- to equal 0: and that's almost never the case. So the above model
should be:
. xi: reg price foreign rep78 i.foreign*i.rep78
Admittedly, the model estimates don't change much, but some of the -test-
results do. Compare:
. test _Irep78_4 = _Irep78_5 = 0
( 1) _Irep78_4 - _Irep78_5 = 0
( 2) _Irep78_4 = 0
F( 2, 63) = 0.55
Prob > F = 0.5803
without the constituent variables, with
. test _Irep78_4 = _Irep78_5 = 0
( 1) _Irep78_4 - _Irep78_5 = 0
( 2) _Irep78_4 = 0
Constraint 2 dropped
F( 1, 63) = 0.17
Prob > F = 0.6847
when we include them. OK, it's a silly dataset, but the point is an
important one!
CLIVE NICHOLAS |t:
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/