[R] Help with Beta Distribution

Tharacad.Ramanarayanan@aventis.com Tharacad.Ramanarayanan at aventis.com
Wed Jan 23 21:21:29 CET 2002


Prof. Ripley:

Thank you. Yes, I want to fit a 4 parameter beta distribution. I transformed
to data using a simple linear transform X(A,B) => x(0,1) (following
suggestions from Jagath Seth and Tony Rossini -- thank you) and tried to use
fitdistr. I could not get much convergence from 'optim' and I ran out of
patience to try a whole bunch of starting values. I guess because of the
inherent non-linearity, the output from 'pbeta' are very senstive to the
parameteres and hence the difficulty in convergence(??)

I have not tried to write my own function using the density function for
beta. For my immediate need, I had another distribution (gamma) fitting the
data reasonably well and I was trying to fit beta out of curiosity. BTW, I
am  indeed looking into distributions for use as a "prior" distribution for
a parameters in a Monte Carlo simulation. I might play more with 'beta'
later.

Thank you all for your suggestions and help.

T. S. Ramanarayanan, Ph.D.
Aventis CropScience
Research Triangle Park, NC 27709
(919) 549-2611

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: Wednesday, January 23, 2002 9:30 AM
To: Ramanarayanan, Tharacad
Cc: rossini at u.washington.edu; r-help at stat.math.ethz.ch
Subject: RE: [R] Help with Beta Distribution


On Wed, 23 Jan 2002 Tharacad.Ramanarayanan at aventis.com wrote:

> -----Original Message-----
> From: rossini at blindglobe.net [mailto:rossini at blindglobe.net]
> Sent: Tuesday, January 22, 2002 5:26 PM
> To: Ramanarayanan, Tharacad
> Cc: r-help at hypatia.math.ethz.ch
> Subject: Re: [R] Help with Beta Distribution
>
>
> >>>>> "TR" == Tharacad Ramanarayanan <Tharacad.Ramanarayanan at aventis.com>
> writes:
>
>     TR> First let me confess that I am a R-novice.  I am trying to fit
>     TR> a beta distribution for a dataset using fitdistr(MASS). I am
>     TR> having difficulties with it because the function tends to fit
>     TR> a distribution with a range of 0 to 1 (I guess). However, my
>     TR> dataset is not!
>
> Since a beta (range in 0,1) doesn't describe what you want, why force
> it?
>
> Hmm . . . a standard beta distribution(B(x)) is 0 < x < 1. So is a
standard
> uniform distribution. A standard beta distribution can be transformed for
> any (positive) range.

But then it is not a beta distribution as defined in R and used in
fitdistr, so you need to define it yourself.

You appear to want the `four-parameter beta distribution' as defined in
the Encyclopedia of Statistical Sciences, with a reference to an
unpublished PhD thesis.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list