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" <ralfaro76@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
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)

Rodrigo.


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" <raphael.fraser@gmail.com>
To: <statalist@hsphsun2.harvard.edu>
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
Kingston
Jamaica

Tel:  (876) 927-2471; 410-4699
Fax: (876) 927-2984
e-mail: raphael.fraser@uwimona.edu.jm
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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