Skip to contents

Sum of the I x J 2 x 2 Pearson statistics with Bonferroni and second-order Rao-Scott tests.

Usage

Spmi(W, Y, add_constant = 0.5)

Arguments

W

n x I 0/1 matrix.

Y

n x J 0/1 matrix.

add_constant

Replacement for zero cells.

Value

list(statistic, statistic_ij, p_ij, p_bonferroni, rs2_statistic, rs2_df, rs2_p).

References

Bilder, C. R. & Loughin, T. M. (2025). Analysis of Categorical Data with R, 2nd ed. Sec 6.2, eq (6.13).

Examples

Spmi(cbind(c(1, 0, 1, 0, 1, 0), c(0, 1, 1, 0, 0, 1)), cbind(c(1, 0, 1, 0, 1, 0)))$statistic
#> [1] 4.238095