M.fct: Marginalizing Matrix Based on Strata Information
Description
Creates the marginalizing matrix \(M\) using strata information found in input variable strata. That is, \(Mp\) gives the marginal probabilities corresponding to the levels of factor strata.
Usage
M.fct(strata, ncells = length(strata))
Arguments
strata
The vector that gives the stratum membership identifier.
ncells
Number of contingency table cells. Default:
ncells = length(strata).
Value
M.fct returns the marginalizing matrix M.
References
Lang, J. B. (2004) Multinomial-Poisson homogeneous models for contingency tables, Annals of Statistics, 32, 340--383.