Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: clustered regression--in over my head

From   "Christopher W. Ryan" <>
To   Statalist <>
Subject   st: clustered regression--in over my head
Date   Thu, 11 May 2006 11:15:12 -0400

I am trying to work with one of my residents who is studying obesity in
our practice.  We have a dataset consisting of about 150 patients, who
collectively made about 700 visits over the course of two years.  They
were selected for study because their BMI > 30.  Number of visits per
person ranges from 1 to over 15.

Pertinent variables are:
mrn = medical record number
bmi = body mass index
visitnumber =  the sequential visit number for a patient:  first visit,
second visit, etc.

One question we are interested in is:  does the BMI tend to increase
over time?

I can't just look at mean BMI by visit number.  That statistic does
increase, but we suspect that increasingly heavier people simply tend to
make more visits, because of more severe comorbidities.

So here's where I get into deep water.  Using Stata 8, I tried this:

-regress bmi visitnumber, cluster(mrn)-

which produces (abbreviated for compactness):

Regression with robust standard errors    Number of obs =     766
                                           F(  1,   149) =    4.54
                                           Prob > F      =  0.0348
                                           R-squared     =  0.0413
Number of clusters (mrn) = 150            Root MSE      =  6.8239

              |               Robust
          bmi |      Coef.   Std. Err.      t    P>|t|
  visitnumber |   .2778606   .1304586     2.13   0.035
        _cons |   36.10313   .5658324    63.81   0.000

Am I on the right track with this?  I have never used -cluster()-
before.  I won't be learning anything about time series analysis until
the fall, and I wonder whether it might be appropriate in this situation.



Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
and Wilson Family Practice Residency, Johnson City, NY
GnuPG and PGP public keys available at

"If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea."  [Antoine de St. Exupery]
*   For searches and help try:

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