Announcement

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

  • use plots for bysort and xtsum

    Dear all,

    I have a strongly balanced panel data and I run the commands below to get some descriptive statistics

    xtset id year
    xtsum y x
    bysort year: sum y x
    bysort id: sum y x



    Is there a way to plot (with histogram?) the values of these tables so as to visualize better the information provided by these commands?
    My id is small, 1,2,..,12 and my year is also small 1990-1994.
    So I thought that since id and year take small values, maybe some plots will work better.

    Thanks in advance!

  • #2
    Thanks a lot!

    Comment


    • #3
      Could I have some ideas? Many thanks

      Comment


      • #4
        This didn't get any answers to date.

        I know why I didn't answer it (quickly) and can guess otherwise. In short, it's hard to know precisely what you're asking for and perhaps you are not clear yourself.

        I don't think there is a graphical adjunct to xtsum and indeed as the variables in a panel dataset could have utterly different units and magnitudes it's hard to imagine what that might be.

        Otherwise as you're mentioning only two variables y and x other than id and year, I suggest looking at

        Code:
        xtline y, overlay 
        xtline x, overlay 
        
        
        scatter y x, by(id) c(l)

        Comment


        • #5
          Thank you so much Nick!

          Comment

          Working...
          X