Hi!
I am using stata13/MP from a Mac computer.
I am new to stata and I am having trouble creating graphs. That would be great if someone could give me some advice.
In my data, I have a "state" variable, which contains the 50 U.S. states. I also have a variable called "mandate_year" which gives the year in which a given state passed a mandate.
I want to create a graph showing the evolution of healthcare coverage over time. The tricky part is that I want one graph for each group of states that passed a mandate in the same year.
For instance, if CA and CO passed a mandate in 2008, but MN and MA passed a law in 2009, I will want:
1) One graph showing the evolution of coverage for the states CA and CO only
2) One graph showing the evolution of coverage for the states of MN and MA only
I thought about using a local macro:
local states2008 "CO CA"
local states2009 "MN MA"
foreach group of local states2008 local states2009 {
[insert graph code]
}
Unfortunately, that doesn't seem to work. Could you give me some help?
Thanks in advance!
Best,
Ana
I am using stata13/MP from a Mac computer.
I am new to stata and I am having trouble creating graphs. That would be great if someone could give me some advice.
In my data, I have a "state" variable, which contains the 50 U.S. states. I also have a variable called "mandate_year" which gives the year in which a given state passed a mandate.
I want to create a graph showing the evolution of healthcare coverage over time. The tricky part is that I want one graph for each group of states that passed a mandate in the same year.
For instance, if CA and CO passed a mandate in 2008, but MN and MA passed a law in 2009, I will want:
1) One graph showing the evolution of coverage for the states CA and CO only
2) One graph showing the evolution of coverage for the states of MN and MA only
I thought about using a local macro:
local states2008 "CO CA"
local states2009 "MN MA"
foreach group of local states2008 local states2009 {
[insert graph code]
}
Unfortunately, that doesn't seem to work. Could you give me some help?
Thanks in advance!
Best,
Ana
Comment