Announcement

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

  • How to have smaller coefficient plots using the coefplot command?

    In the following code. I want to have five separate coefficient plots distributed symmetrically. But the current code is making it too dense. I tried using it without the byopts argument but that creates X axises only below each column and not below each graph (this is ideally what I would like to have).

    Ideally, I want 5 graphs each with their X and Y axises labelled in a (2 rows, 3 columns) format. Also, I want to name each of the graphs differently than from the stored regression estimates. Currently, the "label" function is not working too.

    coefplot (HurrReg_log4, label(Murder) keep(Minor13 Minor49 Minor1020 Major13 Major49 Major1020) pstyle(p4)) ///
    || (HurrReg_log5, label(Manslaughter) keep(Minor13 Minor49 Minor1020 Major13 Major49 Major1020) pstyle(p4)) ///
    || (HurrReg_log6, label(Rape) keep(Minor13 Minor49 Minor1020 Major13 Major49 Major1020) pstyle(p4)) ///
    || (HurrReg_log7, label(Robbery) keep(Minor13 Minor49 Minor1020 Major13 Major49 Major1020) pstyle(p4)) ///
    || (HurrReg_log8, label(Assualt) keep(Minor13 Minor49 Minor1020 Major13 Major49 Major1020) pstyle(p4)) ///
    ,vertical drop(_cons) yline(0) msize(2) msymbol(D) byopts(col(5)) ///
    legend(off) xlabel( , angle(horizontal)) xtitle(Hurricane exposure by intensity and time, size(3)) ///
    ylabel(, angle(horizontal)) ytitle(Logged arrest rate, size(3))

    Here's what I get
    Click image for larger version

Name:	image_33515.png
Views:	1
Size:	27.7 KB
ID:	1740093
    Last edited by Anupam Ghosh; 16 Jan 2024, 19:48.

  • #2
    You are more likely to get a response if you attach your sample data and/or a figure that shows your current output, Anupam Ghosh. Plus -coefplot- is from ssc and not an official Stata program.

    Comment


    • #3
      Girish,

      Any idea why the bylabel function is now working with this code. I tried replacing the label.

      Comment

      Working...
      X