Nasser Abbasi wrote: > "Duncan Murdoch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > >> 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? > I don't know. This is a common problem with special functions: they are invented more than once with different parametrizations, and it's tricky to recognize how they are related. You'll need to go to the referenced literature, or some other reference such as Johnson and Kotz.
Duncan Murdoch ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.