I have a dataset of event instances that include information such as year, financial cost of event, state the event occurred in, etc.
I can graph the total number of events per year with
However, I want to subdivide the events based on the state in which they occurred in, and then have a separate line for each state. I'm trying to do that by subdividing the dataset into states and then renaming the year variable as "yearKentucky" and "yearVirginia",
but then when I try to run
I have two many variables specified. Is there a quick workaround for this?
Thank you muchly!
I can graph the total number of events per year with
Code:
graph twoway histogram year, discrete freq recast(line) xtitle("Year") ytitle("Event Count") title("Number of US Events Each Year")
but then when I try to run
Code:
graph twoway histogram yearKentucky yearVirginia, discrete freq recast(line) xtitle("Year") ytitle("Event Count") title("Number of Events Each Year in Kentucky and Virginia")
Thank you muchly!
Comment