Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: mysterious missing variables after mydate=mdy(month,day,year)


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: mysterious missing variables after mydate=mdy(month,day,year)
Date   Mon, 30 May 2011 17:20:53 +0200

On Mon, May 30, 2011 at 4:43 PM, ABDUL ADAM <[email protected]> wrote:
> Dear List,
>
> I have a panel dataset where my date is in different variables (month, day, year), I am able to create a single date variable by mydate=mdy(month,day,year). But the thing is after generating this new variable, stata returns (132 missing values generated). I tried to see where these missing values lie? but to my surprise, I cannot find them; even after
> su  mydate if mydate>=.
> I get zero observations. So, I wonder:

-sum- will only summarize non-missing values, so -su  mydate if
mydate>=.- will always return no observations. For this type of
inspection of data I like Ben Jann's -fre- command. In your case I
would type -fre month day year if mydate >= .-. You can install -fre-
by typing in Stata -ssc install fre-

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------

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