Hi all,
I have some data on sales (in a variable called log_sales2) categorized in 10 categories according to:
Code:
egen log_salescat = cut(log_sales2), group(10) label
I would like to form a graph showing if there is a relationship between the variables' categories sorted and another variable called mean_own First I tried a simple graph as follows:
Array . But of course it looks naive. I would like to construct equally sized bins for each category of sales putting a labeling like 0-3, 3-5... for the categories. Further I would like to put a single point displaying the average of mean_own for each category, possibly connected.
I am thinking I guess of something like:
Code:
twoway (histogram,...) (connected,...)
but the problem is that I don't know how to force equally sized bins for histogram. Moreover, I know that this is a very hard and general question if you don't know the data, but I am just trying to have some general ideas: do you think that there is a more efficient way to show the relationship among variables?
Basically log_salescat are sales categories and mean_own is an own elasticity of demand.
Any help is appreciated,
Federico
0 Response to Accurate binning-scatter
Post a Comment