<>
Sounds like a case for a -reshape long- to me, before you even -regress-...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Miranda Kim
Gesendet: Mittwoch, 20. Januar 2010 10:26
An: [email protected]
Betreff: Re: st: AW: Plotting regression coefficients
Thank you Martin, Alan and Nick for your replies,
I'm sorry I didn't give enough description of my dataset. As it is
currently structured I have each line (observation) corresponding to a
distinct person. I have five variables for each individual (five columns
in my dataset):
gluc = 2-h glucose concentration
bmi0 = BMI at birth
bmi4 = BMI at age 4
bmi6 = BMI at age 6
bmi8 = BMI at age 8
I could simply type
reg gluc bmi0
reg gluc bmi4
etc.
saving the regression coefficients (and CIs) along the way, and then
plotting them.
But I didn't know if this was a long-winded way of going about it.
Many thanks
Miranda
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
Martin Weiss wrote:
> <>
>
>
> Apart from -statsby-, -ssc d parmest- by Roger Newson may be useful for
> you...
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Miranda Kim
> Gesendet: Dienstag, 19. Januar 2010 18:03
> An: [email protected]
> Betreff: st: Plotting regression coefficients
>
> 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/
>
>
>
*
* 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/