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: using xtline to create panel data plots


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using xtline to create panel data plots
Date   Tue, 13 Sep 2011 19:28:28 +0100

Even if there were, a chaos of different scales would surely ensue.

What I suggest is that you think of

1. whether some nonlinear scale would help (seemingly not logarithmic
if 0 is a value, but cube root or asinh are other possibilities).

2. an appropriate standardisation for graphical purposes, which might
be for each panel (e.g.)

(value - mean) / sd, value / mean or (value - min)/(max - min)

With #1 or  #2, you'd need to create the variable first: -gen- would
be handy for #1 and -egen- would be handy for #2.

Nick

On Tue, Sep 13, 2011 at 7:18 PM, Venkiteshwaran, Vinod
<Vinod.Venkiteshwaran@tamucc.edu> wrote:
> I have a panel data set for several industries spanning a twenty year time period.
> The variable I am trying to plot is the value of a financial ratio across time for each industry.
> The range of this ratio value differs by industry.
> For eg. industry-1 has a range of (0 .0068227,  0.0537253) while industry-2 has a range of (0.0102397 ,  0.2309189) for the same ratio.
> The overall sample range for this variable is (0,  0 .237276)
> Is there anyway to get xtline to plot graphs for each industry panel using the range applicable to only that industry as opposed to the range for the entire sample.
> I understand I can create the graphs one industry at a time to resolve this issue.

*
*   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