Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Expanding y axis in coefplot graph

    Hello,

    I am using coefplot to make a graph of odds ratios for 2 different models. When I apply marker labels, they overlap a bit so I want to space out/expand the y axis to make it clearer. Does anyone know how to do this? I have put my whole code below, though only the last line is directly relevant. I have also attached the graph so far. Any other way to fix this problem would also be appreciated.
    Thanks for your help.


    Code:
    **Graphing - Crude and adjusted model ORs
    *Crude ORs of KEY variables with case control definition 8*
    foreach var of varlist animals_mouse_rat age_years raspberry_picker sex interpreter raspberry_packer irrigation_contact muddy years_employed berry_eating_bin water_tank hands water_home gloves_any  {
    quietly logistic case_control_8 `var'
    estimates store `var'
    }
    
    *Multivariable
    logistic  case_control_8 interpreter animals_mouse_rat gloves_any years_employed
    estimates store Adjusted
    
    coefplot (animals_mouse_rat raspberry_picker interpreter water_tank muddy hands irrigation_contact age_years berry_eating_bin years_employed raspberry_packer water_home sex gloves_any, label(Crude)) (Adjusted) , drop(_cons) xline(1, lwidth(thin) lpattern(dash)) xscale(log) eform mlabel format(%9.2f) mlabposition(15) mlabsize(vsmall) mlabgap(*1) xlabel(0.25 "0.25" .5 "0.5" 1 "1" 2 "2" 5 "5" 10 "10" 20 "20", labsize(small)) ylabel(,labsize(small)) ciopts(recast(rcap))
    Click image for larger version

Name:	Graph.png
Views:	3
Size:	58.1 KB
ID:	1463506
    Attached Files

  • #2
    One way is to adjust the length of the graph using the -ysize()- option. See help region_options.
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment

    Working...
    X