Dear All, I got these results from the example in the function "dbeta":>x <- seq(0, 1, length=21) > dbeta(x, 1, 1)[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Any Idea? TIA Giovanni dr. Giovanni Parrinello Section of Medical Statistics Department of Biosciences University of Brescia 25127 Viale Europa, 11 Brescia Italy Tel: +390303717528 Fax: +390303701157
Why strange? It is known that Beta(1, 1) = Uniform(0,1) whose density
is 1/(1-0)=1
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: <parrinel at med.unibs.it>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, November 09, 2004 10:24 AM
Subject: [R] Strange results for Beta Distribution
> Dear All,
> I got these results from the example in the function "dbeta":
>
>>x <- seq(0, 1, length=21)
>> dbeta(x, 1, 1)
> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> Any Idea?
> TIA
> Giovanni
>
> dr. Giovanni Parrinello
> Section of Medical Statistics
> Department of Biosciences
> University of Brescia
> 25127 Viale Europa, 11
> Brescia Italy
> Tel: +390303717528
> Fax: +390303701157
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
On Tue, 9 Nov 2004 parrinel at med.unibs.it wrote:> I got these results from the example in the function "dbeta": > > >x <- seq(0, 1, length=21) > > dbeta(x, 1, 1) > [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > Any Idea?What does help page say the density is? A Beta(1,1) distribution is U(0, 1), and that has density 1. -- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 09-Nov-04 parrinel at med.unibs.it wrote:> Dear All, > I got these results from the example in the function "dbeta": > >>x <- seq(0, 1, length=21) >> dbeta(x, 1, 1) > [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > Any Idea?The density function for Beta(p,q) is (x^(p-1))*((1-x)^(q-1))/B(p,q). In your example, p = q = 1, so the density function is 1 everywhere. Best wishes, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 [NB: New number!] Date: 09-Nov-04 Time: 10:18:41 ------------------------------ XFMail ------------------------------