I have a variable called 'expenditure' and another variable called 'location', which contains a group of location. If I want to see the histogram distribution of expenditure in a specific location, I can do so by
Ideally, I'd like to use qnorm, instead, e.g.
However, when I use the the above qnorm command and add the "if" statement to specify my desired location, the y-axis of the resulting graphs takes the whole range of my 'expenditure' variable, rather than the range of my 'expenditure' variable that are relevant for my specified location. This results in some graphs being flat and completely unusable.
Is there a way to generate graphs with qnorm in which the y-axis contains the range of my 'expenditure' variable, but only limited to, say, location=="CityA" ?
Code:
histogram expenditure if location=="CityA", discrete frequency
Code:
qnorm expenditure if location=="CityA"
Is there a way to generate graphs with qnorm in which the y-axis contains the range of my 'expenditure' variable, but only limited to, say, location=="CityA" ?
Comment