0% found this document useful (0 votes)
31 views6 pages

Getting The Logarithm

The document discusses using the LN() and EXP() functions in Excel to calculate logarithms and antilogarithms. It explains that LN() returns the natural logarithm of a number, and EXP() returns the original number from its logarithm. It provides examples of using LN(100) to get the logarithm of 100 and EXP(4.60517) to get the original number from its logarithm. The document also explains how logits are calculated in logistic regression models and how logits need to be converted to probabilities using antilogarithms.

Uploaded by

krish lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views6 pages

Getting The Logarithm

The document discusses using the LN() and EXP() functions in Excel to calculate logarithms and antilogarithms. It explains that LN() returns the natural logarithm of a number, and EXP() returns the original number from its logarithm. It provides examples of using LN(100) to get the logarithm of 100 and EXP(4.60517) to get the original number from its logarithm. The document also explains how logits are calculated in logistic regression models and how logits need to be converted to probabilities using antilogarithms.

Uploaded by

krish lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Getting the logarithm

6.238325 =LN(512)

So:
2.718282 ^ 6.238325 = 512

Getting the antilog

512 =EXP(B3)
In Excel, the LN() function returns the natural logarithm.

LN() takes one argument

So, LN(100) returns the natural logarithm of 100 4.60517

and therefore 2.718282 raised to 4.60517 equals 100

Use the EXP() function to return the antilog.

EXP() also takes one argument, the logarithm

So, EXP(4.60517) returns the original numb 100

If you intend to use one of R's functions to calculate a logistic regression, you don't need either LN() or EXP().

But If you want a clearer picture of what's going on in mlogit, the best way is to set things up in Excel. And for that you need b

Let's look at an example


el. And for that you need both LN() and EXP)
Coefficients
Intercept Milliliters Age Sex
-22.30164 0.562577 0.126686 2.58431

Milliliters
Gets the of Predicted
flu vaccine Age Sex Logit Odds Probability
0 16.9 50 1 -3.88244 0.02060 0.0202
0 17.0 50 1 -3.80208 0.02232 0.0218
0 17.5 47 1 -3.91599 0.01992 0.0195
0 17.4 49 1 -3.71802 0.02428 0.0237
0 18.3 42 1 -4.1086 0.01643 0.0162
0 18.0 47 1 -3.62488 0.02665 0.0260
0 17.9 49 1 -3.46089 0.03140 0.0304
0 17.5 55 1 -2.89376 0.05537 0.0525
0 18.0 51 1 -3.1093 0.04463 0.0427
0 14.2 52 2 -2.57468 0.07618 0.0708
0 18.2 52 1 -2.91391 0.05426 0.0515
0 18.9 55 1 -2.12484 0.11945 0.1067
1 15.7 49 2 -2.07393 0.12569 0.1117
0 20.1 54 1 -1.57189 0.20765 0.1719
1 20.0 55 1 -1.49942 0.22326 0.1825
0 20.2 53 1 -1.61967 0.19796 0.1652
0 18.2 44 2 -1.3378 0.26242 0.2079
0 17.1 54 2 -0.68789 0.50264 0.3345
0 21.4 53 1 -0.94023 0.39054 0.2809
0 21.3 56 1 -0.63589 0.52947 0.3462
1 17.9 57 2 0.16688 1.18161 0.5416
0 19.2 51 2 0.111 1.11739 0.5277
0 19.3 53 2 0.43179 1.54001 0.6063
1 23.5 51 1 -0.01348 0.98662 0.4966
1 19.5 55 2 0.7997 2.22486 0.6899
1 23.2 59 1 0.79491 2.21424 0.6889
1 20.6 47 2 0.39677 1.48702 0.5979
1 21.3 54 2 1.69013 5.42018 0.8442
0 21.2 56 2 1.86614 6.46332 0.8660
1 21.8 51 2 1.61093 5.00748 0.8335
1 21.7 58 2 2.43714 11.44029 0.9196
1 23.5 53 2 2.82849 16.91982 0.9442
0 25.1 46 1 0.2073 1.23035 0.5516
1 26.4 41 2 2.93721 18.86322 0.9497
1 25.8 48 1 0.87078 2.38878 0.7049
1 26.2 43 2 3.04243 20.95615 0.9545
Using techniques that I walk through in the next chapter, you predict a value called the logit.

The logit is the log of the odds

You'll hear it pronounced in various ways, including "lodge-it," "low-jit" and "low-git."

You still need to convert the logit to the probability. Since the logit is the log of the odds, that means you need to
1. Convert the logit to the odds by taking its antilog. In Excel you use EXP()) to do that. In R it's handled automatical
2. Convert the odds to probability by Odds = Prob / (1 + Prob). In R it's handled automatically.

So, using row 6 as an example:

Logit = -3.8824
Odds = EXP(-3.8824)
Odds = 0.02060

Prob = 0.02060 / (1 + 0.02060)


Prob = 0.020184
eans you need to
. In R it's handled automatically.

You might also like