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

st: Stratifying after regression (with 2 interactions)


From   "Raoul C Reulen" <[email protected]>
To   <[email protected]>
Subject   st: Stratifying after regression (with 2 interactions)
Date   Thu, 1 Dec 2005 11:26:12 -0000

Hello,

I am comparing the blood pressure between two groups by means of
multivariable regression. This is the regression model:
 
.xi: regress BP i.age*group i.sex*group
 
Where:

"BP" is bloodpressure

"group" is coded as 0 (group A) and 1 (group B)

Maarten Buis has kindly shown me how I should stratify the group results
by age (based on this model .xi:reg BP i.age*group i.sex):

.tab age, gen(age)
.forvalues i = 1/10 { /*assuming you have 10 age categories*/
            .gen age`I'Xgroup=age`i'*group
}
.xi reg BP i.age i.sex age1Xgroup-age10Xgroup

And this works fine (thanks Maarten)
But how do I stratify the variable 'group' also for 'sex' AND age?
I want to now the regression coefficient of variable group, by age and
sex. 
I hope this is clear. Thanks.

Raoul.


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