multinomial test

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

multinomial test

Li,Qinghong,ST.LOUIS,Molecular Biology
Hi All,

What is the R function for computing multinomial distribution, e.g. f(2,1,3; 2/9, 1/6, 11/18, 6)?

That is, a total of 6 trials, event 1's p1=2/9, x1=2, event 2's p2=1/6, x2=1, and event 3's p3=11/18, x3=3.

thanks,
Johnny

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: multinomial test

jholtman
?sample

sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))



On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology <
[hidden email]> wrote:

>
> Hi All,
>
> What is the R function for computing multinomial distribution, e.g.
> f(2,1,3; 2/9, 1/6, 11/18, 6)?
>
> That is, a total of 6 trials, event 1's p1=2/9, x1=2, event 2's p2=1/6,
> x2=1, and event 3's p3=11/18, x3=3.
>
> thanks,
> Johnny
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



--
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What the problem you are trying to solve?

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: multinomial test

Bert Gunter
Qinghong:

R Has an extensive Help system which you should learn to use.

help.search('multinomial')
?Multinomial

Jim: sample() is wrong -- it gives random samples, not probabilities.

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA


> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of jim holtman
> Sent: Wednesday, February 22, 2006 3:33 PM
> To: Li,Qinghong,ST.LOUIS,Molecular Biology
> Cc: [hidden email]
> Subject: Re: [R] multinomial test
>
> ?sample
>
> sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))
>
>
>
> On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology <
> [hidden email]> wrote:
> >
> > Hi All,
> >
> > What is the R function for computing multinomial distribution, e.g.
> > f(2,1,3; 2/9, 1/6, 11/18, 6)?
> >
> > That is, a total of 6 trials, event 1's p1=2/9, x1=2, event
> 2's p2=1/6,
> > x2=1, and event 3's p3=11/18, x3=3.
> >
> > thanks,
> > Johnny
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What the problem you are trying to solve?
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: multinomial test

Li,Qinghong,ST.LOUIS,Molecular Biology
In reply to this post by Li,Qinghong,ST.LOUIS,Molecular Biology
Thanks Jim. I think my previous posting wasn't clear enough. What I try to do is to compute the probability: f(2,1,3; 2/9, 1/6, 11/18, 6). (If we compute by hand, it is 0.1127). What is the R funtion for doing that?
 
I know for binomial tests, there is a function called binom.test. But for multinomial events, is there a similar function in R?
 
thanks
Johnny

-----Original Message-----
From: jim holtman [mailto:[hidden email]]
Sent: Wednesday, February 22, 2006 5:33 PM
To: Li,Qinghong,ST.LOUIS,Molecular Biology
Cc: [hidden email]
Subject: Re: [R] multinomial test


?sample
 
sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))


 
On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology < [hidden email]> wrote:

Hi All,

What is the R function for computing multinomial distribution, e.g. f(2,1,3; 2/9, 1/6, 11/18, 6)?

That is, a total of 6 trials, event 1's p1=2/9, x1=2, event 2's p2=1/6, x2=1, and event 3's p3=11/18, x3=3.

thanks,
Johnny

       [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html





--
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What the problem you are trying to solve?


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: multinomial test

Li,Qinghong,ST.LOUIS,Molecular Biology
In reply to this post by Li,Qinghong,ST.LOUIS,Molecular Biology
Thanks. That is what I try to find. You know what, I have tried ?multinomial, but it didn't recognize. It is case sensitive I guess.

Johnny

-----Original Message-----
From: Berton Gunter [mailto:[hidden email]]
Sent: Wednesday, February 22, 2006 5:44 PM
To: 'jim holtman'; Li,Qinghong,ST.LOUIS,Molecular Biology
Cc: [hidden email]
Subject: RE: [R] multinomial test


Qinghong:

R Has an extensive Help system which you should learn to use.

help.search('multinomial')
?Multinomial

Jim: sample() is wrong -- it gives random samples, not probabilities.

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA


> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of jim holtman
> Sent: Wednesday, February 22, 2006 3:33 PM
> To: Li,Qinghong,ST.LOUIS,Molecular Biology
> Cc: [hidden email]
> Subject: Re: [R] multinomial test
>
> ?sample
>
> sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))
>
>
>
> On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology <
> [hidden email]> wrote:
> >
> > Hi All,
> >
> > What is the R function for computing multinomial distribution, e.g.
> > f(2,1,3; 2/9, 1/6, 11/18, 6)?
> >
> > That is, a total of 6 trials, event 1's p1=2/9, x1=2, event
> 2's p2=1/6,
> > x2=1, and event 3's p3=11/18, x3=3.
> >
> > thanks,
> > Johnny
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What the problem you are trying to solve?
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: multinomial test

Sundar Dorai-Raj
This is what I get when I try ?multinomial:

 > ?multinomial
No documentation for 'multinomial' in specified packages and libraries:
you could try 'help.search("multinomial")'
                ^^^^^^^^^^^^^^^^^^^^^^^^^^

Which leads to ?Multinomial and Bert's advice below.

--sundar


Li,Qinghong,ST.LOUIS,Molecular Biology wrote:

> Thanks. That is what I try to find. You know what, I have tried ?multinomial, but it didn't recognize. It is case sensitive I guess.
>
> Johnny
>
> -----Original Message-----
> From: Berton Gunter [mailto:[hidden email]]
> Sent: Wednesday, February 22, 2006 5:44 PM
> To: 'jim holtman'; Li,Qinghong,ST.LOUIS,Molecular Biology
> Cc: [hidden email]
> Subject: RE: [R] multinomial test
>
>
> Qinghong:
>
> R Has an extensive Help system which you should learn to use.
>
> help.search('multinomial')
> ?Multinomial
>
> Jim: sample() is wrong -- it gives random samples, not probabilities.
>
> -- Bert Gunter
> Genentech Non-Clinical Statistics
> South San Francisco, CA
>
>
>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]] On Behalf Of jim holtman
>>Sent: Wednesday, February 22, 2006 3:33 PM
>>To: Li,Qinghong,ST.LOUIS,Molecular Biology
>>Cc: [hidden email]
>>Subject: Re: [R] multinomial test
>>
>>?sample
>>
>>sample(1:3, 6, TRUE, prob=c(2/9, 1/6, 11/18))
>>
>>
>>
>>On 2/22/06, Li,Qinghong,ST.LOUIS,Molecular Biology <
>>[hidden email]> wrote:
>>
>>>Hi All,
>>>
>>>What is the R function for computing multinomial distribution, e.g.
>>>f(2,1,3; 2/9, 1/6, 11/18, 6)?
>>>
>>>That is, a total of 6 trials, event 1's p1=2/9, x1=2, event
>>
>>2's p2=1/6,
>>
>>>x2=1, and event 3's p3=11/18, x3=3.
>>>
>>>thanks,
>>>Johnny
>>>
>>>       [[alternative HTML version deleted]]
>>>
>>>______________________________________________
>>>[hidden email] mailing list
>>>https://stat.ethz.ch/mailman/listinfo/r-help
>>>PLEASE do read the posting guide!
>>>http://www.R-project.org/posting-guide.html
>>>
>>
>>
>>
>>--
>>Jim Holtman
>>Cincinnati, OH
>>+1 513 646 9390
>>
>>What the problem you are trying to solve?
>>
>> [[alternative HTML version deleted]]
>>
>>______________________________________________
>>[hidden email] mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide!
>>http://www.R-project.org/posting-guide.html
>>
>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html