[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: log to the base 2
What matters here is what StataCorp thought when
choosing which functions to implement.
The point is when to stop. If another base other than
e and 10 were to be supplied, it would certainly be base 2.
However, I don't think that logs base 2 are especially
often needed in statistical work -- if they were this
would be an FAQ because many others would have the
same question as you -- and as the work-around is easy
I guess StataCorp decided to stop short.
> I thought the logs were so easy to calculate this would be a single
> standard function in Stata. I suppose you thought: if they are so easy
> to calculate why write a function.
> On 10/17/06, Nick Cox <email@example.com> wrote:
> > You hardly need any such function. The recipe
> > log(x) / log(2) or log10(x) / log10(2) will suffice.
> > For example,
> > . di log(8) / log(2)
> > 3
> > Strictly just one log function is enough, but -log10()-
> > is a convenience for those preferring the unnatural.
> > > 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?
* For searches and help try: