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

RE: st: Stratifying after regression (with 2 interactions)


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   RE: st: Stratifying after regression (with 2 interactions)
Date   Thu, 01 Dec 2005 23:09:49 +0900

Raoul C Reulen wrote:

thanks for that.

But I am still a bit confused about what to do in the following
situation:

.xi: regress BP i.age*group i.sex*group

I want to know the difference between groupA and groupB for males in the
first age group, then for females in the first age group, then for males
in the second age group etc.? How do I do this? Simply by:

.xi: reg BP group if age==1 & sex==0 (males, first age group)

.xi reg BP group if age==1 & sex==1 (females, first age group)

.xi reg BP group if age=2 & sex==0 (males, second age group)

Or is this incorrect since you don't use the whole model? If correct,
there must be an easier way to do this. Thanks.

--------------------------------------------------------------------------------

Okay. I think that I know what you're after, now.  What I recommend is to
take a look at -lincom- (-adjust-, too) to get at what you're after here.

That is:  fit the model with -xi- (or -xi3-) as described before, and then
use -lincom- to construct a linear contrast of the resulting coefficients
in order to get at the values that you're interested in.

Joseph Coveney

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