Announcement

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

  • Distribution of quantitative variable across the categries of a categorical variable

    Hi! Could someone tell me which command to use in stata to compare the distribution of a quantitative variable across the categories of a categorical variable?
    I thank you in advance

  • #2
    Anything you like

    Code:
    histogram 
    
    dotplot 
    
    anova 
    
    regress 
    
    glm
    ???

    Comment


    • #3
      Dear Nick, I would like to visualize the distribution. Sorry, for not specifying.
      I have two variables:income which is quantitative and conflicto that has 3 categories depicting the level of conflict. I would like to see how income is distributed within each of the three levels of conflicto. I've tried
      graph box ln_PERCAPITA birthreg, but it gives a boxplot for income and for conflicto, but what I would like to see is 3 boxplots ( each for each level of conflict) depicting the distribution of income

      Comment


      • #4
        Code:
        graph box ln_PERCAPITA birthreg
        Code:
        gives a boxplot for income and for conflicto
        I don't follow that. but

        Code:
        graph box ln_PERCAPITA, over(conflicto)
        may work better and stripplot (from SSC) will in my view work even better.

        I guess you have perhaps 200 countries, and so the data could easily be shown here (unless it's also panel data and you're not telling us that).

        Comment


        • #5

          graph box ln_PERCAPITA, over(conflicto) This worked perfectly! Thanks

          Comment

          Working...
          X