powered by
marg.hom fits a marginal homogeneity model to a contingency table that has two margins of equal size.
marg.hom
marg.hom(freq, marg1, marg2)
Vector of frequencies
Factor variable for the first margin
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.
# NOT RUN { # 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) # }
Run the code above in your browser using DataLab