Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Graph tsline(or line) with missing value


From   "Jia Xiangping" <[email protected]>
To   [email protected]
Subject   Re: st: Graph tsline(or line) with missing value
Date   Fri, 1 Dec 2006 02:46:07 +0800

Say thanks to Vince,

-cmissing(no)- is  the command I want.  Tons of thanks.


On 11/30/06, Vince Wiggins, StataCorp <[email protected]> wrote:
Jia Xiangpin <[email protected]> asks,

> I am graphing a time-series data, in which some years are missing.
> Is that possible for me to graph the line with the missing left
> blank, instead of connecting bluntly.
>
> For example, while the data in 1950s are available, 1960 are
> missing.  By default, the data are connected and there is a sudden
> increase/decrease in trend.

Whether observations with missing data are ignored, so that the line is
continuous, or recognized, so that the line has a break, is controlled by the
option -cmissing()-.  If Jia will add the option -cmissing(no)- to the
-tsline- command, the line will be broken wherever there is missing data.

In almost all cases with time-series data, it does not matter whether you have
observations with completely missing data for some time periods or whether
those observations are simply not included in the dataset.  This is not true
for -cmissing()-.  -cmissing()- doesn't understand time, but does understand
missing data.

If Jia's data does not include the missing time periods, Jia can type,

   . tsfill

before drawing the graph.  -tsfill- will fill in any missing time periods with
missing data.


-- Vince
  [email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


--
Xiangping JIA
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index