Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: log to the base 2

From   "Rodrigo A. Alfaro" <>
To   <>
Subject   st: Re: log to the base 2
Date   Tue, 17 Oct 2006 13:08:25 -0400

What about log_a(X) = log_b(X) / log_b(a)?
then log_2(X) = log_e(X) / log_e(2)


Checking the property of log...

set obs 100
g x=_n
g x10=log10(x)
g xe=log(x)
reg x10 xe, noc
di 1/log(10)

----- Original Message ----- 
From: "Raphael Fraser" <>
To: <>
Sent: Tuesday, October 17, 2006 12:41 PM
Subject: st: log to the base 2

I have been trying to find a function that can calculate the log of a
number to base 2. I can't find one. Am I missing something here or am
I not searching hard enough? Can any one help?

I see log to base 10 and log to base e but what happen to the other bases?

Raphael A. Fraser, MSc
Assistant Lecturer in Biostatistics
Sickle Cell Unit
Tropical Medicine Research Institute
Faculty of Medical Sciences
University of the West Indies

Tel:  (876) 927-2471; 410-4699
Fax: (876) 927-2984
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index