[R] Generating 2x2 contingency tables
Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Feb 18 08:30:47 CET 2004
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.
> Any Idea?
> Best regards..
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help