Raoul C Reulen wrote:
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
[omitted]
. . . 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.
--------------------------------------------------------------------------------
If you're looking only for two two-way interactions, then -xi- will do it
without any trouble (see below).
See also Michael Mitchell's & Phil Ender's -xi3-, especially if you
eventually will want the third two-way interaction and the three-way
interaction (although -xi- will do that, too; it just takes a couple of
passes). Type:
findit xi3
on the command line form within Stata for more information.
Joseph Coveney
clear
set more off
sysuse bplong
rename when group
xi: regress bp i.agegrp*i.group i.sex*i.group
// or
xi3: regress bp i.agegrp*i.group i.sex*i.group
// for the saturated model
xi3: regress bp i.agegrp*i.sex*i.group
exit
*
* 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/