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

Re: st: Adjusting confidence intervals

From   Ronán Conroy <>
Subject   Re: st: Adjusting confidence intervals
Date   Wed, 13 Oct 2004 14:23:44 +0100

Ilesh Patel wrote:


I have computed a difficulty score for a range of vision tasks and want to see if there is a difference in the mean score by self-rated overall health (scored from 1 – 4). Following is what I used:

Sort overall_hlth

by overall_hlth: ci diff_score

This gives me the mean difficulty score and it’s CI for each of the 4 self-rated overall health groups. What command do I use in Stata to adjust the CI for age given that I think age affects both the difficulty score.

. xi:regress diff_score i.overall_hlth age

(this builds a model with overall health represented by dummy variables for all but the first level, and adjusts for age)

. adjust age, by(overall_hlth) xb ci label(Age-adjusted mean) cilabel(95% CI)

This will produce age adjusted mean scores with confidence intervals, evaluated at the overall mean age of the sample. I actually prefer taking a round figure for age that is somewhere towards the centre of the data, and doing

. adjust age=40, by(overall_hlth) xb ci label(Predicted mean at age 40) cilabel(95% CI)


Ronan M Conroy ( Senior Lecturer in Biostatistics Royal College of Surgeons Dublin 2, Ireland +353 1 402 2431 (fax 2764) -------------------- Just say no to drug reps

* For searches and help try:

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