Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Overlaying indicator variables on time series plots using xtline


From   "Venkiteshwaran, Vinod" <Vinod.Venkiteshwaran@tamucc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Overlaying indicator variables on time series plots using xtline
Date   Tue, 13 Sep 2011 20:36:02 +0000

This post is really a continuation of my previous post on using xtline. However since the question is of a different nature here I decided to start a new thread.
My data is  of a panel nature measured at industry/year levels. I am creating time series plots of a financial ratio(with several observations that are zero) by industry. I want to include indicator variables on the same plot when their value is 1 overlaid on the time series line plot. While I can add this variable as an additional plot in xtline with a new Y axis the resulting graph is not very useful. I want to have the indicator variable show up as a 'scatter' plot overlaid on the time series plot therefore allowing the graph to indicate at what levels of the financial ratio the value of the indicator variable was 1. 
I attempted to multiply the indicator variable with the financial ratio and plot the resulting product as an additional scatter plot. While the outcome here is what I am looking for the resultant graph does not show instances where the financial ratio variable was equal to zero.

Any suggestions?

Thank you
Vinod

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index