r3dtable {chi2x3way}R Documentation

Simulations for generating three-way contingency tables

Description

It allows 1) the generation of nboots=1000 randomly tables where the row, column, tube probabilities can be prescribed by the analyst. By default, they are uniform.

Usage

r3dtable(I = 3, J = 3, K = 3, pi=rep(1/I,I), pj=rep(1/J,J), pk=rep(1/K,K), nboots = 1000, 
nran = 10000, digits = 3)

Arguments

I

The number I is set equal to the rows of the input table X.

J

The number J is set equal to the columns of the input table X.

K

The number K is set equal to the tubes of the input three-way table X.

pi

The prescribed row probabilities. By default, they are homogeneous.

pj

The prescribed column probabilities. By default, they are homogeneous.

pk

The prescribed tube probabilities. By default, they are homogeneous.

nboots

The number of the random three-way tables that you want to generate.

nran

The total number of individuals of each generated three-way table.

digits

The minimum number of decimal places, digits, used for displaying the numerical summaries of the analysis. By default, digits = 3.

Value

XB

The nboots=1000 randomly generated three-way tables.

XB[[i]]$pi

The row, prescribed probabilities of the i.th randomly generated three-way table.

XB[[i]]$pj

The column, prescribed probabilities of the i.th randomly generated three-way table.

XB[[i]]$pk

The tube, prescribed probabilities of the i.th randomly generated three-way table.

margI

The row observed margins of the randomly generated three-way table.

margJ

The column observed margins of the randomly generated three-way table.

margK

The tube observed margins of the randomly generated three-way table.

Note

This function allows the generation of random tables under the complete independence with different theoretical probabilities.

Author(s)

Lombardo R, Takane Y, Beh EJ

References

Beh EJ and Lombardo R (2014) Correspondence Analysis: Theory, Practice and New Strategies. John Wiley & Sons. Lancaster H O (1951) Complex contingency tables treated by the partition of the chi-square. Journal of Royal Statistical Society, Series B, 13, 242-249.
Loisel S and Takane Y (2016) Partitions of Pearson's chi-square ststistic for frequency tables: A comprehensive account. Computational Statistics, 31, 1429-1452.

Examples

r3dtable(I = 3, J = 3, K = 3, pi=rep(1/3,3), pj=rep(1/3,3), pk=rep(1/3,3), 
nboots = 10, nran = 1000, digits = 3) 

[Package chi2x3way version 1.1 Index]