See the second entry under
help extended_fcn
or try:
sysuse auto
foreach v of varlist _all {
loc type: type `v'
di as res "`v'" as txt " is type" as res " `type'"
}
On Mon, Apr 21, 2008 at 11:01 AM, Jacob Wegelin <[email protected]> wrote:
> The following program is a kluge to determine the type of a variable and to
> assign a string to a local macro which tells us the type. Is there some
> better way? For instance, "return list" after "describe myvar" or "codebook
> myvar" does not tell us this.
>
*
* 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/