Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: bizarre missing observations

From   "Neil Shephard" <[email protected]>
To   [email protected]
Subject   Re: st: bizarre missing observations
Date   Wed, 8 Oct 2003 16:10:42 +0100

> I am having problem with a variable (refdate)  It is a continuous
> measure of the date of first college enrollment.  The coding scheme is
> YEAR.PROPORTION OF YEAR.  For example 1992.5 means that the student
> enrolled in college in June of 1992, 1992.58 means the student
> enrolled in college in July of 1992, 1992.67 means the student
> enrolled in college in August of 1992, and so forth.
> When I have STATA run a frequency distribution (tab refdate), it tells
> me that I have 6,268 observations who enrolled in 1992.67
> However, when I run the command:
> tab refdate if refdate == 1992.67
> STATA tells me that there are 'no observations'
> How could that be if in the frequency distribution there are 6,268
> cases?  
This sounds like something I've been bitten by before.

Check the storage type of refdate....

des refdate

Its most probably stored as a float, in which case you need to use 
the float function when evaluating your expression, so 

tab refdate if refdate == float(1992.67)

should do it.



Neil Shephard
Genetics Statistician
ARC Epidemiology Unit, University of Manchester
[email protected]
[email protected]

"Contrariwise, if it was so, it might be; and if it
were so it would be; but as it isn't, it ain't. That's
logic" - Tweedledee (Alice Through the Looking Glass)
*   For searches and help try:

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