[R] Generating 2x2 contingency tables

Mahmoud K. Okasha m.okasha at palnet.com
Wed Feb 18 11:11:47 CET 2004


Hi again,
Thank you. I solved my problem by sampling from the multinomial
distribution..
Best regards ...

----- Original Message -----
From: "Torsten Hothorn" <Torsten.Hothorn at rzmail.uni-erlangen.de>
To: "Mahmoud K. Okasha" <m.okasha at palnet.com>
Cc: <r-help at stat.math.ethz.ch>
Sent: Wednesday, February 18, 2004 9:30 AM
Subject: Re: [R] Generating 2x2 contingency tables


>
> On Tue, 17 Feb 2004, Mahmoud K. Okasha wrote:
>
> > Hello R-users,
> >
> > I would like to generate two-way contingency tables with zero in one
cell. I tried to use the function r2dtable but I could not force one cell to
have zero value.
> >
>
> r2dtable samples from the conditional distribution of the table given the
> margins. And with margins fixed AND one cell fixed (to zero) the
> conditional distribution just puts mass one at the observed table.
>
> You may want to sample from a multinomial distribution with one
> of the parameters fixed to zero.
>
> Best,
>
> Torsten
>
> > Any Idea?
> >
> > Best regards..
> > Mahmoud
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
> >
> >
>
>




More information about the R-help mailing list