Hi ,
I am doing a scatter plot between insured people percentage (X axis) and rate of hospitalization (Y axis). I have used lfit command to get a linear fit of the scatter. I wanted to check if there is a direct method to know the R-squared /goodness of fit value of this linear fit? or should I run a regression and manually enter the value in the graph? Plus, if I do that manually is there a way to write R2 because I could not find an option for raise to the power 2?
My stata codes are
graph twoway (scatter perc_insured per_adm , mcolor(red) mlabcolor(red)) (lfit perc_insured per_adm , lpattern(dash) lcolor(black)), legend(off), height(6)) graphregion(color(white)) plotregion( m(b=0) )
I am doing a scatter plot between insured people percentage (X axis) and rate of hospitalization (Y axis). I have used lfit command to get a linear fit of the scatter. I wanted to check if there is a direct method to know the R-squared /goodness of fit value of this linear fit? or should I run a regression and manually enter the value in the graph? Plus, if I do that manually is there a way to write R2 because I could not find an option for raise to the power 2?
My stata codes are
graph twoway (scatter perc_insured per_adm , mcolor(red) mlabcolor(red)) (lfit perc_insured per_adm , lpattern(dash) lcolor(black)), legend(off), height(6)) graphregion(color(white)) plotregion( m(b=0) )
Comment