You might find the "statsby" prefix useful. Type -help statsby- for
more information. Something like the following would produce a
dataset of coefficients. You can captur eother statistics like the
standard errors and then construct and plot your coefficients.
statsby, by(age): regress bloodglucose bmi
Best,
Alan
On Tue, Jan 19, 2010 at 12:03 PM, Miranda Kim <[email protected]> wrote:
> I am using Stata v11
>
> I would like to run four regressions of the same outcome variable on a given
> predictor at four different timepoints. For example:
>
> Blood glucose vs. BMI at birth
> Blood glucose vs. BMI at age 4
> Blood glucose vs. BMI at age 6
> Blood glucose vs. BMI at age 8
>
> Then I would like to plot the four regression coefficients and respective
> confidence intervals on the same graph, with time as the x-axis.
>
> I wonder what the most straightforward way of producing such a plot would
> be.
> Any suggestions would be of great help.
>
> Many thanks,
> Miranda
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/