Announcement

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

  • log(x) calculator in Stata - simple!

    Hi all. Apologies in advance if this is a terribly simple query (new to Stata), but it has been bugging me... I imagine it will have a very quick answer.

    I am trying to generate the log of a bunch of glucose values (e.g. log(glu), but the command doesn't seem to give me the answer I would expect.

    e,g:

    di log(4.8)
    = 1.5686159

    However when I calculate log(4.8) on calculator I get 0.68124 (e.g. http://www.webconversiononline.com/l...ype=log&of=4.8 )

    Trying to figure out why the Stata result seems to be different... am I putting in the command incorrectly, or misinterpreting log?

    Thanks in advance!

    Patrick







  • #2
    Code:
    di log10(4.8)
    .68124124
    Red Owl
    Stata/IC 15.1, Windows 10 (64-bit)

    Comment


    • #3
      On the web page you referred to, change the function to nLog (Natural Log). It gives you

      Value of nLog(4.8) = 1.56861592
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 18.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment

      Working...
      X