Announcement

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

  • Graphs

    how would I go about producing s graph like this in STATA, what would be the commands?

    Any help will be appreciated, thank you.
    Click image for larger version

Name:	Screenshot 2023-03-11 190017.png
Views:	1
Size:	86.8 KB
ID:	1705367

  • #2
    Here's a start

    Code:
    webuse nlswork, clear
    sample 5
    tw scatter ln_wage ind_code , by(union)   || lowess ln_wage ind_code , by(union, leg(off) note(""))
    Last edited by Justin Niakamal; 11 Mar 2023, 15:54.

    Comment


    • #3
      Originally posted by Justin Niakamal View Post
      Here's a start

      Code:
      webuse nlswork, clear
      sample 5
      tw scatter ln_wage ind_code , by(union) || lowess ln_wage ind_code , by(union, leg(off) note(""))
      Thank you so much sir!

      Comment


      • #4
        Originally posted by Justin Niakamal View Post
        Here's a start

        Code:
        webuse nlswork, clear
        sample 5
        tw scatter ln_wage ind_code , by(union) || lowess ln_wage ind_code , by(union, leg(off) note(""))
        do you by any chance know how can I round the x axis, i.e; what is the command in stata that i have to use in order to group all the recorded observations by 5,6,7,8,9... as seen on the x-axis

        Comment


        • #5
          Any numeric variable x can be rounded to the nearest integer value using round(x) or equivalently round(x, 1)

          For more see https://www.stata-journal.com/articl...article=dm0095

          Comment


          • #6
            Originally posted by Nick Cox View Post
            Any numeric variable x can be rounded to the nearest integer value using round(x) or equivalently round(x, 1)

            For more see https://www.stata-journal.com/articl...article=dm0095
            cheers!

            Comment

            Working...
            X