Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Calcualting CIs for Beta distribution

From   "Nick Cox" <>
To   <>
Subject   st: RE: Calcualting CIs for Beta distribution
Date   Fri, 11 Jul 2003 18:57:21 +0100

Chris Johnson
> Is anyone aware of a STATA function to calculate confidence 
> intervals for
> a sample drawn from a Beta distribution?  I have applied 
> findit, search,
> and help, but no luck.

This search should have pointed you to -beta- on 

I note that this program -- which is for version 
4 of Stata and dated 16 April 1997 -- is broken by 
Stata version 8. You need only change the line 

scalar `bnum' = `H' + log((`s' + `a' + `b' - 0.5) //*
*/  (`s' +`b' - 0.5))


scalar `bnum' = `H' + log((`s' + `a' + `b' - 0.5) / /*
*/  (`s' +`b' - 0.5))

However, a deeper question is what confidence intervals 
do you seek? In -beta- and in many other discussions, the beta 
distribution is parameterised by two parameters on 
the same footing and their estimates will often be 
correlated, so I imagine you should be worrying about that. 

-beta- will yield standard errors and an estimate 
of the correlation between estimates. However, it 
was not written in terms of -ml-, but it is a 
rather literal translation of an algorithm published 
in the meteorological literature. 

I am the author of -beta-. Some day I would like to  
implement the ML estimation in -beta- in terms of -ml-, 
in which case some of the ingredients you need would 
be produced automagically, but I am unlikely to get 
to it soon. 

*   For searches and help try:

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