li li
2015-Sep-29 01:58 UTC
[R] cumulative distribtuion function for multinomial distribution in R
Hi all, In R, is there a function for the cumulative distribution function for multinomial distribution? I only see pmultinom and rmultinom which are the prabability mass function and the function for generating multinomial random variables respectively. Thanks! Hanna
Rolf Turner
2015-Sep-29 02:16 UTC
[R] [FORGED] cumulative distribtuion function for multinomial distribution in R
On 29/09/15 14:58, li li wrote:> Hi all, > In R, is there a function for the cumulative distribution function > for multinomial distribution? I only see pmultinom and rmultinom which > are the prabability mass function and the function for generating > multinomial random variables respectively.A moment's Googling would have led you to pmvnorm in package "mvtnorm". cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
ruipbarradas at sapo.pt
2015-Sep-29 08:52 UTC
[R] cumulative distribtuion function for multinomial distribution in R
Hello, Actually, the probability mass function should be dmultinom. I think pmultinom is what you want. Hope this helps, Rui Barradas ? Citando li li <hannah.hlx at gmail.com>:> Hi all, > In R, is there a function for the cumulative distribution function > for multinomial distribution? I only see pmultinom and rmultinom which > are the prabability mass function and the function for generating > multinomial random variables respectively. > Thanks! > ? ?Hanna > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.htmland provide commented, > minimal, self-contained, reproducible code.? [[alternative HTML version deleted]]
Rolf Turner
2015-Sep-29 09:16 UTC
[R] [FORGED] cumulative distribtuion function for multinomial distribution in R
On 29/09/15 14:58, li li wrote:> Hi all, > In R, is there a function for the cumulative distribution function > for multinomial distribution? I only see pmultinom and rmultinom which > are the prabability mass function and the function for generating > multinomial random variables respectively.Dennis Murphy has kindly pointed out to me, off-list, that I miss-read your message. You *clearly* say "multinomial" and *NOT* "multivariate normal"!!! Psigh! OTOH upon reading your message properly I see that it says you have *found* pmultinom. Did you really mean that? The function pmultinom is or would be the cumulative distribution function that you desire. The probability mass function would be called *dmultinom*. That is probably (???) what you found. There seems to be no pmultinom in the default packages or in MASS. However, if one Googles on "multinomial cumulative distribution R" one is quickly led to the pmultinom() function from the "MFSAS" package. Yayyyy! *HOWEVER* (!!!) if one tries to install that package one is informed that it is not available for R 3.3.2. Booooo! I found the archived source of the package OK, and it seems to install OK except for a minor squawk about vignettes. So if you have the capability to install from source you would appear to be home and hosed. I could not find "MFSAS" amongst the orphaned packages. It has not clear why it isn't among them. Can anyone enlighten me about that? The DESCRIPTION file in the source package from the Archives says nothing about "orphaned". cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
peter dalgaard
2015-Sep-29 12:35 UTC
[R] [FORGED] cumulative distribtuion function for multinomial distribution in R
On 29 Sep 2015, at 04:16 , Rolf Turner <r.turner at auckland.ac.nz> wrote:> On 29/09/15 14:58, li li wrote: >> Hi all, >> In R, is there a function for the cumulative distribution function >> for multinomial distribution? I only see pmultinom and rmultinom which >> are the prabability mass function and the function for generating >> multinomial random variables respectively. > > A moment's Googling would have led you to pmvnorm in package "mvtnorm".A moment spent with a cup of strong coffee would have led you to realize that multinomial and multivariate normal are two different things.... ;-) - pd> > cheers, > > Rolf Turner > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com