• Laura Whiting

A Histogram Plot of Conditional Means

You can plot the means of your chosen y-variable, conditional on your chosen x-variable. You can also plot medians, frequencies (counts), or proportions (fractions). If you want to plot these instead simply add the word median to the end of the plot command for conditional medians, add the word count for conditional frequencies, or add the word fraction for conditional proportions.

To create a conditional means histogram you first need to download the cmogram command from the SSC, which you do in Stata using the following command:

To generate this graph in Stata, use the following commands:

40 views0 comments

Recent Posts

See All