Announcement

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

  • How can I transform all variables of a database into logs?

    Is there a kind of "shortcut" I could use to simply transform all variables of a STATA database into their natural logs?

  • #2
    Code:
    sysuse auto, clear
    ds, has(type numeric)
    foreach var of varlist `r(varlist)'{
    replace `var' =ln(`var')
    }

    Comment


    • #3
      Cool! Thx a lot Jorrit!

      Comment

      Working...
      X