Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Getting different vertical lines in each graph produced by xtline


From   David Merriman <[email protected]>
To   [email protected]
Subject   st: Getting different vertical lines in each graph produced by xtline
Date   Tue, 10 Jul 2012 11:26:40 -0500

I have a panel data set of states over 25 years of so with their
corporate income tax revenue.

I have produced 50 graphs using xtline showing the change in corporate
income tax revenue by year using sytax like

xtline  corp_y_index

Many states have over the course of this period adopted a policy that
may have changed the growth rate of corporate income tax revenue.
I have a variable named d_payroll_app  that equals either zero or 1 in
each year in each state.  A 1 indicates a policy change.

I would like to add a vertical line to each graph in each year in
which d_payroll_app=1.

I thing that I could do something like this manually using syntax like

graph line corp_y_index year if state==1, xline(1985) name(graph1)
graph line corp_y_index year if state==2, xline(1987) name(graph2)
.
.
.
graph combine graph1 graph2.....

This would be tedious and would require that I look up each year in
which each state had a policy change.

Is there an easier way to do this?

Thanks


David Merriman
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index