marg.hom | R Documentation |
marg.hom
fits a marginal homogeneity model to a contingency table
that has two margins of equal size.
marg.hom(freq, marg1, marg2)
freq |
Vector of frequencies |
marg1 |
Factor variable for the first margin |
marg2 |
Factor variable for the second margin |
A list containing the call, the model, the deviance, the degrees of freedom, the aic, the fitted values, and the residuals is returned.
J.K. Lindsey
# 4x4x2 table in Freq, with margins indexed by Left and Right
Freq <- rpois(32,10)
Left <- gl(4,1,32)
Right <- gl(4,4,32)
marg.hom(Freq, Left, Right)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.