pgirmess (version 2.0.3)

permcont: Random permutation of a contingency table n row x 2 columns

Description

Return a random permutation of a contingency table n rows x 2 columns keeping the marginal totals

Usage

permcont(Table)

Value

A matrix with the permuted values

Arguments

Table

a contingency table

Details

The contingency table is split in a two colums table of 0/1 categories, sampled and re-organised with the function table()

Examples

Run this code
tab<-cbind(n1=c(10,12,8,7,5),n2=c(4,5,8,10,12))
tab
permcont(tab)

Run the code above in your browser using DataLab