Announcement

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

  • Log values Excel versus Stata

    Dear All,

    I would like to ask about why is the log using excel function is not the same as the value of log using stata?

    in excel, I used the following function: =log(variable)

    in stata, I used the following function: =log(variable)

  • #2
    Documented difference. In MS Excel log() defaults to base 10, whereas in Stata, log() means only natural logarithm to base exp(1) ~ 2.71828.

    In Stata

    Code:
    help log()

    for more. Stata also has a function log10().

    Comment


    • #3
      Note as well that other online calculators or programing languages will use log base 2 as the convention.

      Comment


      • #4
        Thank you very much.

        Comment


        • #5
          Both Excel and Stata also recognize ln(x) as the natural log specification, which can clarify the base being used.

          Comment

          Working...
          X