Hello everyone
How can I make a forest plot type graph after a logistic regression that in the left sector shows the graph and on the right side shows the odd ratio values, confidence intervals and p-values?
For example, here I have a regression with disability as the dependent variable and sex, age (decennial) and education as covariates. When running the regression I use the following commands
logistic disability sex i.agre_group i.education
then to make the forest plot I use this command
coefplot, drop(_cons) xline(1, lcolor(red) lpattern(dash)) title("Odds Ratios con Intervalos de Confianza 95%") xlabel(,angle(45)) mcolor(blue) ciopts(recast(rcap) lcolor(black))
But, I would like the OR, CI and P-values to appear on the side of the plot.
Is it possible to do that? any guidance on this?
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 100 out of 885 observations
Use the count() option to list more
How can I make a forest plot type graph after a logistic regression that in the left sector shows the graph and on the right side shows the odd ratio values, confidence intervals and p-values?
For example, here I have a regression with disability as the dependent variable and sex, age (decennial) and education as covariates. When running the regression I use the following commands
logistic disability sex i.agre_group i.education
then to make the forest plot I use this command
coefplot, drop(_cons) xline(1, lcolor(red) lpattern(dash)) title("Odds Ratios con Intervalos de Confianza 95%") xlabel(,angle(45)) mcolor(blue) ciopts(recast(rcap) lcolor(black))
But, I would like the OR, CI and P-values to appear on the side of the plot.
Is it possible to do that? any guidance on this?
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str25 id byte sex float(education disability agre_group) "1091002" 1 2 1 1 "1091003" 2 3 1 1 "1091004" 2 3 0 1 "1091006" 1 2 0 2 "1091007" 1 1 1 3 "1091008" 1 1 1 4 "1091013" 1 3 1 2 "1091016" 2 2 1 2 "1091019" 2 2 1 1 "1091020" 2 3 1 3 "1091021" 1 3 0 3 "1091022" 2 1 1 3 "1091023" 2 2 0 2 "1091024" 2 1 1 3 "1091025" 2 1 0 2 "1091026" 2 2 0 1 "1091027" 2 3 0 2 "1091028" 1 3 1 3 "1091029" 1 2 0 1 "1091030" 1 1 1 2 "1091031" 2 2 1 1 "1091032" 1 1 1 1 "1091033" 1 1 1 1 "1091034" 2 1 1 2 "1091035" 2 2 1 2 "1091037" 1 2 1 2 "1091039" 2 2 1 2 "1091040" 2 1 1 3 "1091041" 2 3 1 1 "1091042" 2 2 0 1 "1091045" 1 2 1 1 "1091047" 2 2 1 1 "1091049" 2 2 0 1 "1091050" 1 1 0 3 "1091051" 1 1 1 3 "1091053" 2 3 0 1 "1091059" 1 2 0 3 "1091060" 1 2 1 3 "1091061" 1 2 1 1 "1091062" 2 1 1 3 "1091063" 2 1 1 4 "1091064" 1 1 1 3 "1091065" 1 2 1 3 "1091068" 1 1 0 1 "1091069" 2 1 1 3 "1091070" 2 1 1 2 "1091074" 1 1 0 1 "1091076" 2 1 0 1 "1091079" 2 1 1 2 "1091081" 1 3 0 1 "1091083" 2 1 0 2 "1091089" 1 2 0 2 "1091091" 1 3 0 3 "1091094" 2 2 0 2 "1091105" 1 1 1 1 "1091106" 1 1 1 1 "1091107" 1 2 1 3 "1091108" 1 2 1 1 "1091111" 1 2 1 1 "1091113" 2 1 0 1 "1091114" 1 2 0 3 "1091115" 1 1 0 1 "1091116" 1 1 1 3 "1091117" 2 2 0 2 "1091118" 1 2 1 2 "1091122" 1 2 0 2 "1091123" 1 2 1 4 "1091124" 2 2 0 1 "1091125" 1 3 1 1 "1091126" 1 3 1 1 "1091127" 1 2 0 1 "1091128" 1 2 1 2 "1091129" 1 3 1 2 "1091130" 1 2 1 1 "10911302" 2 2 0 1 "1091131" 2 1 1 4 "1091132" 2 1 1 3 "1091133" 2 3 0 1 "1091134" 1 2 1 1 "10911342" 2 3 1 1 "1091135" 2 3 1 2 "1091136" 2 2 0 2 "1091137" 1 1 1 1 "1091141" 1 1 1 3 "1091143" 1 3 1 3 "1091144" 2 3 1 1 "1091173" 2 1 0 1 "1091174" 2 1 1 1 "1091176" 1 2 1 1 "1092001" 2 2 1 3 "1092002" 1 2 0 2 "1092003" 1 3 0 2 "1092004" 1 3 0 1 "1092005" 2 2 1 1 "1092006" 1 2 0 1 "1092007" 1 2 1 3 "1092008" 1 1 1 1 "1092009" 2 1 1 2 "1092010" 1 3 1 1 "1092011" 1 1 1 2 end label values sex a2l label def a2l 1 "Hombre", modify label def a2l 2 "Mujer", modify label values education esc2 label def esc2 1 "0-3 años", modify label def esc2 2 "4-8 años", modify label def esc2 3 "9+ años", modify label values disability dis label def dis 0 "No limitado", modify label def dis 1 "Limitado", modify label values agre_group edd label def edd 1 "60-69 años", modify label def edd 2 "70-79 años", modify label def edd 3 "80-89 años", modify label def edd 4 "90+ años", modify
Listed 100 out of 885 observations
Use the count() option to list more
Comment