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

Re: st: empty dataset; display gives impossible answer


From   Roger Harbord <[email protected]>
To   [email protected]
Subject   Re: st: empty dataset; display gives impossible answer
Date   Wed, 30 Jun 2004 11:03:39 +0100

This is reproducible using the auto dataset so it's not an artefact of your particular data:

. sysuse auto
(1978 Automobile Data)

. list in 1

+---------------------------------------------------------------+
1. | make | price | mpg | rep78 | headroom | trunk | weight |
| AMC Concord | 4,099 | 22 | 3 | 2.5 | 11 | 2,930 |
|---------------------+-------------+---------------------------|
| length | turn | displa~t | gear_r~o | foreign |
| 186 | 40 | 121 | 3.58 | Domestic |
+---------------------------------------------------------------+


. keep if 1==2
(74 observations deleted)

. list

. count
0

. di make price mpg
AMC Concord409922

Roger.
----------------------------------------------------
Roger Harbord mailto:[email protected]
Department of Social Medicine, University of Bristol


--On 30 June 2004 10:52 +0200 "A.M. Vos" <[email protected]> wrote:


that was my first thought too, but it is not. Neither is UNIEKNR the 11th
variable.
and I would expect either two stata answers (because I asked display two
variables), or an error message, or just nothing.
It's just curiosity, it may not be important at all, but I would like to
understand it.
Annelies

Toyoto Iwata wrote:

Sorry, perhaps this is my mistake.

CL_NR was the eleventh variable. and Stata should be reporting
its token.

At 17:09 04/06/30 +0900, I wrote:
> In case "CLPL =. "
>
> .list (varlist you need for the diagnosis)
>
>
> Toyoto
>

> the "keep" I had an empty dataset, with only the names of all (about 50)
> variables. Why than did "display <variable1> <variable2>" give an
> answer, and what does it mean?
>
> . dis _N
> 8200
>
> . keep if (FIRSTCAS==1 & CLPL~=1)
> (8200 observations deleted)
>
> . dis CL_NR UNIEKNR
> 11
>
> thanks for any thougts,
> Annelies
>
>
> --
> A.M. Vos
> dept. of Public Health
> Erasmus MC

*
*   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/
--
A.M. Vos
dept. of Public Health
Erasmus MC
University Medical Center Rotterdam
P.O. Box 1738
3000 DR Rotterdam
The Netherlands
Tel: +31 (10) 4087502
Fax: +31 (10) 4089449
email: [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/

*
*   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