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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Twoway graph question


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Twoway graph question
Date   Tue, 26 Mar 2013 17:05:03 +0000

. search cui, author sj

to get a link to the PDF of a paper by James Cui explaining how to offset bars. The rest is a variation on

. twoway bar y1 t1 || bar y2 t2

Nick

On 26 Mar 2013, at 16:41, Rohit Sonika <net@rsonika.me> wrote:

Hi Statalist,

I have a query concerning graph based on three variables. The variables I am using are as follows:

timetoev1: continuous variable counting a time to or from event 1.

timetoev2: continuous variable counting a time to or from event 2.

return: variable of stock return during the event time in question.

Here is my question: I am able to graph return with respect to each event independently as follows:

twoway bar return timetoev1
twoway bar return timetoev2

However, given that both the event variables are in event time, I would like to see an overall of returns around the two event variables in a single graph with event time in x-axis and returns around each event in y-axis (hence two bars for each event time). Is there a convenient way to accomplish this?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index