Announcement

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

  • How to add two variables with one conditions each using graph bar

    I would like to graph two variables with one condition each. For example, I would like to graph wage and savings, but when wage is greater than 3 and when savings is greater than 50.

    I am trying:

    graph bar (percent) wages savings if savings==0

    However, the graph that i get not only conditions savings by the condition, but also wages. In other words, it graphs all wages that correspond to savings greater than 0. I only want it to condition the variable savings and not wages. What can I do?

  • #2
    This seems contradictory to me.

    1. when wage is greater than 3 and when savings is greater than 50

    2.

    Code:
    graph bar (percent)  wages savings if savings == 0
    3.

    [This graph shows} all wages that correspond to savings greater than 0

    These all say different things, but setting aside the qualifier that you want and the qualifier you used, I can't see that

    Code:
    graph bar (percent) wages savings 
    is in any way a helpful graph. I can't easily guess what you want here: perhaps a histogram or two histograms. Wages and savings are different dimensionally, which adds to the puzzle.


    https://www.statalist.org/forums/help#stata explains how to post data examples.


    Comment

    Working...
    X