pgirmess (version 1.6.9)

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)

Arguments

Table

a contingency table

Value

A matrix with the permuted values

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
# NOT RUN {
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 DataCamp Workspace