Announcement

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

  • Twoway Connected Graph -- Mistakenly Connect the First and Last Value

    Hi!

    I am using stata/MP from a Mac.

    I am trying to get a twoway connected graph, with:
    - On the y-axis, the mean (by year) of the dummy variable called "issue".
    - On the x-axis, the interview years

    Here is the code I used:
    egen mn_issue = mean(issue), by(year)
    tw connected mn_issue year, title("")
    graph save summ_issue.gph, replace

    As you can see on the attached graph, stata connects the 1996 and 2011 values, which I want to avoid.
    Do you know what I did wrong here? Any guidance would be very appreciated.

    Thank you in advance!



    Attached Files

  • #2
    Try

    Code:
    tw connected mn_issue year, sort

    Comment


    • #3
      This works -- thank you so much!

      Comment

      Working...
      X