Hi All

I've produced the below two graphs using coefplot (graphs are based on margins produced after running linear regression models):

graph 1:
Code:
regress bmi14 c.sdmh14##c.sdmh14 i.peducation2 i.incomeq3 i.ethnic5cat if sex==1 
margins , at(sdmh14=(-6(1)6)) post
est store age14males

regress bmi14 c.sdmh14##c.sdmh14 i.peducation2 i.incomeq3 i.ethnic5cat if sex==2 
margins , at(sdmh14=(-6(1)6)) post
est store age14fem

coefplot age14males age14fem, at ytitle(BMI(kg/m2)) xtitle(SD mental health) recast(line) lwidth(*1) noci
graph 2:
Code:
regress bmi17 c.sdmh17##c.sdmh17 i.peducation2 i.incomeq3 i.ethnic5cat if sex==1 
margins , at(sdmh17=(-6(1)6)) post
est store age17males

regress bmi17 c.sdmh17##c.sdmh17 i.peducation2 i.incomeq3 i.ethnic5cat if sex==2
margins , at(sdmh17=(-6(1)6)) post
est store age17fem

coefplot age17males age17fem, at ytitle(BMI(kg/m2)) xtitle(SD mental health) recast(line) lwidth(*1) noci
I know that coefplot allows multiple graphs to be combined in a panel (side by side with a common y-axis). However, I'm not sure how to do this correctly with the recast(line) option specified separately for each graph. Any ideas?

I'm stuck with (this combines both graphs together in the same plot) this obviously wrong code:

Code:
coefplot (age14males \ age17males , label (boys)) ///
         (age14fem \ age17fem , label (girls)), at ytitle(BMI(kg/m2)) xtitle(SD mental health) recast(line) lwidth(*1) noci
Any idea?

Many Thanks
/Amal