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

Re: st: Stata post test (simple question)


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Stata post test (simple question)
Date   Fri, 30 Jan 2004 01:54:59 -0000 (GMT)

Joao Pedro W. de Azevedo wrote (in part):

[...]

>>I would like to test the hypothesis of equality of all coefficients
>> (except
>>the intercept) using two or more different sub samples of my dataset.
>>
>>For example, I would like to compare the results of the following models:
>>
>>         Lnwage = cons + educ + exp + expsq + error (if inside==1)
>>         Lnwage = cons + educ + exp + expsq + error (if inside==0)

Then, Richard A. Williams responded (in part):

[...]

> I know you said you did not want to compute new variables, but it is
> really
> not hard to do and life will be much simpler if you do.  Here is how you
> could do it with the xi command (I just made up some data with your
> variable names to make sure I got it right:)
>
> . xi: reg Lnwage i.inside*educ i.inside*exp i.inside*expsq

[...]

> . test  _IinsXeduc_1 _IinsXexp_1 _IinsXexpsq_1
>
>   ( 1)  _IinsXeduc_1 = 0
>   ( 2)  _IinsXexp_1 = 0
>   ( 3)  _IinsXexpsq_1 = 0
>
>         F(  3,    92) =    0.66
>              Prob > F =    0.5815
>
> Note that I am only testing the three interaction terms, so that allows
> the
> intercept to differ across groups.  You would conclude that the effects of
> educ, exp and expsq do not differ between groups.
>
> If you had more than two groups, xi would compute more vars, and (I think)
> you would want to test all the ones that started with
> _IinsX.  Equivalently, you would not test  _Iinside_1 _Iinside_2 etc.

[...]

Always one to add never-entirely relevant contributions to threads like
this, a recent post attaching Winship and Radbill's excellent (1994) paper
detailed a variation of -test- to the one neatly displayed by Richard. The
DuMouchel-Duncan F-test allows one to test the equality of 'ordinary'
terms and terms interacted with weights, in order to determine whether or
not it is 'legal' to proceed with weighted OLS. Thus, if we start with:

reg y x1 x2 x3

we then run:

reg y x1 x2 x3 x1*weight x2*weight x3*weight weight

and then we:

test x1*weight x2*weight x3*weight weight

and if F is significant, then WOLS is justified. Being of limited
intelligence, I wasn't aware of this simple-but-clever -test- until a
couple of weeks ago: but it's certainly forced me to have a thorough look
at how I was constructing weighted models on my own data, sometimes
blindly assuming that weighted models were always better.

All of which to say, Joao, is that this version of -test- may also be
something for you to try out should you ever feel the need to use weights.
However, if you think that all this amounts to teaching you how to suck
eggs, then I apologise!

Winship C and Radbill L (1994) "Sampling Weights and Regression Analysis",
 SOCIOLOGICAL METHODS & RESEARCH  23(2): 230-57.

CLIVE NICHOLAS        |t: 0(44)191 222 5969
Politics Building     |e: [email protected]
School of Geography,  |f: 0(44)870 126 2421
 Politics & Sociology |
University of         |
 Newcastle-upon-Tyne  |
Newcastle-upon-Tyne   |
NE1 7RU		      |
United Kingdom	      |http://www.ncl.ac.uk/geps
*
*   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/



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