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

Re: st: RE: 'if' with labels but finds no observations


From   David Kantor <dkantor@jhu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: 'if' with labels but finds no observations
Date   Fri, 23 Apr 2004 16:51:00 -0400

What Nick meant was,
tab ... if year_f == "2000/1":name

where you should substitute a value label name for "name" in the above command. That is, the variable year_f presumably has a value label associated with it -- which is presumably given to it by
gen year_f = ncyear(date_v), m(4)

If you do
des year_f
you will see this value label name. Substitute that in place of name in the expression "2000/1":name

I hope this helps.
-- David


At 09:22 PM 4/23/2004 +0100, you wrote:

Thanks Nick for that. Getting there, but not quite yet. Still no observations.

. tab year_f if year_f == "2000/1":name
(value label 2000/1 not found)
no observations

[...]
David Kantor
Institute for Policy Studies
Johns Hopkins University
dkantor@jhu.edu
410-516-5404

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index