Statalist The Stata Listserver

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

st: inconsistent behavior of -ds-

From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: inconsistent behavior of -ds-
Date   Wed, 6 Sep 2006 20:47:11 -0400

Caleb said

To illustrate what appears to be inconsistent behavior of -ds-, consider
this dataset with 9 string variables:

. desc

Contains data from uniondemoc82-3.dta
obs: 180
vars: 10
size: 40,500 (99.9% of memory free)
------------------------------------------------------------------------ -------
storage display value
variable name type format label variable label
------------------------------------------------------------------------ -------
union str80 %80s
id int %8.0g
pres1 str20 %20s
treas1 str17 %17s
sect1 str20 %20s
sect2 str16 %16s
st1 str20 %20s
st2 str16 %16s
st3 str11 %11s
vp1 str19 %19s

. ds
union id pres1 treas1 sect1 sect2 st1 st2 st3

. ds , has(type string)
union pres1 treas1 sect1 sect2 st1 st2 st3 vp1

. ds, has(type 2/8)

. ds , has(type 2/62)
pres1 treas1 sect1 sect2 st1 st2 st3 vp1

. ds , has(type 2/11)

Looks perfectly consistent with -help ds- to me. ds without arguments -> all variables, ok. ds with type string, all but id, ok. has(type 2/8) is shorthand for str2,...str8, of which you have none, ok. has (type 2/62) includes all string variables except union, ok. has(type 2/11) includes only st3, ok. So far ds appears to be batting 1.000. What is inconsistent here?

Kit Baum, Boston College Economics
An Introduction to Modern Econometrics Using Stata:

* For searches and help try:

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