Statalist


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

st: xtline with missing data


From   "John McAdams" <jmcadams@ucsd.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: xtline with missing data
Date   Tue, 6 Oct 2009 14:23:28 -0700 (PDT)

Hi all,

I have a panel data set, and am trying to use "xtline" to graph a variable
over time for each panel unit.  However, the variable is missing for some
observations in some time periods.

When I run "xtline", it does not leave gaps during the periods with
missing data (it connects all the dots).  This leaves one with the
impression that there is in fact no missing data, which is not
satisfactory.

Is there a workaround to tell Stata not to connect dots when there is a
missing data point in between?  I tried adding an if statement to the
xtline call (i.e., xtline variable if variable != .), but that didn't
work.

I'm running Stata 10/SE.

Cheers,
John


*
*   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   |   What's new   |   Site index