Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Return code of data type

    Hello,

    I've noticed the codebook or describe commands don't include datatype in the return code list. Does anyone know if there's a way to obtain a variable's datatype name for programming purposes?

    Thanks a lot,

    Reese

  • #2
    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . local make_t : type make
    
    . local price_t : type price
    
    . display "make `make_t' - price `price_t'"
    make str18 - price int
    Described by taking the "extended_fcn" link in the output of help macro or somewhere in the macro section of the Stata Programming Reference PDF included in your Stata installation, and mentioned in passing in chapter 18 of the Stata User's Guide PDF.

    Comment


    • #3
      Thank you William!! Very helpful as always.

      Comment

      Working...
      X