Announcement

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

  • Same model, different dependent variables: Single Y label in the combined graph

    Dear Statalisters,

    I have troubles using graph combine, I don’t know how to get a single y label for a combination of graphs.

    I ran the same model for three different dependent variables, then stored the graphs of the coefficients using coefplot. Since I want to get a single y label, I removed the y labels of the second and third graph with yscale(off).

    I obtain this combined graph, but it squeezes the first graph.

    Click image for larger version

Name:	Combined graph.png
Views:	1
Size:	67.8 KB
ID:	1632680


    I’ve tried to modify the first graph with xsize and ysize but it seems that graph combine overrides this adjustment.

    Any feedback would be greatly appreciated.

    Thank you very much in advance.

  • #2
    You can alleviate the problem by combining graph 1 with the combination of graph 2 and graph 3.

    Code:
    gr combine two.gph three.gph
    gr save four, replace
    gr combine one.gph four.gph
    Ultimately, if you want perfection, you need to use the -by()- option as Nick Cox argues in https://journals.sagepub.com/doi/ful...36867X20976341. coefplot from SSC does support the -by()- option.

    Comment


    • #3
      Thanks Andrew!

      The result, after some adjustments, is fantastic.



      I like perfection, but since I don't master loops in Stata I will keep this result for this moment.

      Regards
      Attached Files

      Comment

      Working...
      X