[R] how to use R for Beta Negative Binomial

Nasser Abbasi nma at 12000.org
Mon Jan 7 05:34:53 CET 2008


"Duncan Murdoch" <murdoch at stats.uwo.ca> wrote in message 
news:4780ED3B.8020202 at stats.uwo.ca...


> Why did you change the parameters?  If you used the same ones as above,
> you get
>
> > sghyper(a=-1, k=-1, N=5)
> $title
> [1] "Generalized Hypergeometric"
>

>
> $Mean
> [1] 0.2
>
.....
>
> I don't know if those values are correct, but at least they aren't
> nonsensical like the ones you report from Mathematica.
>
> Duncan Murdoch
>
>>

But the thing I do not understand is which is ALPHA, which is BETA and which 
is N?

Could I please ask you show the R command to generate this plot  from NIST 
web site (the second one in the first row)?

http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/gif/bnbpdf.gif

I can produce the plot using Mathematica command. For example, looking at 
the plot for ALPHA=3, BETA=0.5, k=3, (again, the second plot in the first 
row), the following is the command in Mathematica to get the same plot:

http://12000.org/tmp/010608/beta1.PNG

I tried this in R, but I really do not know to tell this command in R which 
is alpha, which is beta and which is k?

thanks again
Nasser




More information about the R-help mailing list