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

st: stratifying after regression

From   "David Winter" <>
To   <>
Subject   st: stratifying after regression
Date   Wed, 9 Nov 2005 13:25:27 -0000

My colleague is having problems subscribing to Statalist.  He asked me
to post this on his behalf.


Mr David L. Winter, HNC
IT Manager (BCCSS Study)
Department of Public Health & Epidemiology
University of Birmingham
B15 2TT
tel: +44 (0)121 4146766
fax: +44 (0)121 4147923

-----Original Message-----
From: Raoul C Reulen 
Sent: 09 November 2005 11:44
To: David Winter
Subject: FW: stratifying after regression


Let's say you want to compare the blood pressure between two groups by
using multivariable linear regression, and the model that looks like

.xi: reg BP i.age i.sexe group i.age*group


"BP" is blood pressure 
"Group" is coded as 0 (group A) and 1 (group B)

Now, because of the interaction between age and group, I want to report
the difference in mean blood pressure between the two groups stratified
by age, but still adjusted for sex. What is the way to do it? 

A) by creating several regression models for every age group, where the
regression coefficient of the variable "group" is the mean difference in
blood pressure between the two groups:

.xi: reg BP i.sexe group if age==1 
.xi: reg BP i.sexe group if age==2
.xi: reg BP i.sexe group if age==3


B) by using the full model .xi: reg  BP i.age i.sexe group i.age*group 
and using .adjust to predict the means of group for every age group:

.adjust sex if age==1 , by(group)
.adjust sex if age==2 , by(group)
.adjust sex if age==3 , by(group)

The results differ slightly because in example A you use data for the
variable "sex" only for the age group of interest, but in example B you
use all the data on "sex" (so for all age groups). What is the correct

Thanks for the help.


*   For searches and help try:

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