Announcement

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

  • Help with dot plot axis

    Hi Forum,
    This is my first post so I apologize if I make mistakes, but i did indeed read the directions. I am trying to plot

    I am trying to plot the relative risks associated with different studies. Some studies have multiple outcomes with multiple relative risks associated. As such, I would like the x axis to state the name of the study author alongside the 1-10 associated outcomes. I would also like there to be a space between the different studies. However, I have had almost no success manipulating the x axis names outside of graph editor. Can you help? Below are my current code and graph

    graph dot rr_uncertain rr_positive, over(outcome_id) yscale (range(0,5)) yline(1) ytitle("Relative risk")

    Thank you VERY much!
    KPC
    Attached Files

  • #2
    Hi Katharine, welcome to Statalist!

    Please go through the FAQ here, especially #12, and implement the suggestions there. In particular, please
    • post your graph as a PNG file, not .gph (see #12.4 and 12.5)
    • post a data example using the dataex command (as suggested in #12.2)
    • post your code using CODE delimiters (see #12.3)

    Comment


    • #3

      I would like the x axis to state the name of the study author alongside the 1-10 associated outcomes.
      It sounds like you want plots by study author as opposed to a single plot. What variable identifies studies in your dataset? In any case, provide a data example that includes this variable and the variables listed in #1. You can do this by copying and pasting the output from the following:

      Code:
      dataex rr_uncertain rr_positive outcome_id study_name
      where you replace "study_name" above with the actual name of your study identifier in your dataset.

      Comment

      Working...
      X