Hi,
I've run into a problem and I'm not sure how to fix it. I would like to include an if statement for a barchart I am producing. The data I have is in the form count type year, where count is the number of units for the type in the year.
This code produces the chart I would like. However I would like to limit it to a select few types. Type is categorical and ranges from 1-8. How should I change the code so that the bar chart contains only types 2 to 5 for example?
Thanks
I've run into a problem and I'm not sure how to fix it. I would like to include an if statement for a barchart I am producing. The data I have is in the form count type year, where count is the number of units for the type in the year.
Code:
egen count_total_by_y_t = total(count), by(year type) gen count_total_by_y_t_k = count_total_by_y_e/1000 graph bar count_total_by_y_t_k, percentages over(engine) asyvars over(year) stack
Thanks
Comment