I have performed a linear regression model to investigate the association between a GaitScore and Pain adjusted for age and sex
. regress GaitScore Pain age i.sex
This create the regression model
GaitScore| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Pain | -1.030371 .5217701 -3.02 0.004 -2.656475 -0.55933
age | -0.301733 0.201676 -1.53 0.122 -.0005076 0.090161
sex | -2.065706 2.0057716 -0.67 0.480 -.2116815 3.685403
_cons | 49.68492 6.329089 7.85 0.000 37.06195 62.30789
------------------------------------------------------------------------------
If I then plot a twoway scatter with the lfit line
. twoway (scatter GaitScore Pain) (lfit GaitScore Pain)
This draws the scatter with the prediction plots (or how a simple regression linear would look GaitScore, Pain)
However the line I really wanted is the regression line for Pain adjusted for age and sex.
GaitScore = 49.7 + -1.03*Pain
Is that possible, preferable form the stored results from the regression model or manually by writing the formula for the line?
Hope my question is clear..
I am using Stata version 13.1, windows 7,
Thanks in advance
Kind regards
Dennis Nielsen
Biomedical engineer
. regress GaitScore Pain age i.sex
This create the regression model
GaitScore| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Pain | -1.030371 .5217701 -3.02 0.004 -2.656475 -0.55933
age | -0.301733 0.201676 -1.53 0.122 -.0005076 0.090161
sex | -2.065706 2.0057716 -0.67 0.480 -.2116815 3.685403
_cons | 49.68492 6.329089 7.85 0.000 37.06195 62.30789
------------------------------------------------------------------------------
If I then plot a twoway scatter with the lfit line
. twoway (scatter GaitScore Pain) (lfit GaitScore Pain)
This draws the scatter with the prediction plots (or how a simple regression linear would look GaitScore, Pain)
However the line I really wanted is the regression line for Pain adjusted for age and sex.
GaitScore = 49.7 + -1.03*Pain
Is that possible, preferable form the stored results from the regression model or manually by writing the formula for the line?
Hope my question is clear..
I am using Stata version 13.1, windows 7,
Thanks in advance
Kind regards
Dennis Nielsen
Biomedical engineer
Comment