Learn R Programming

repeated (version 1.1.9)

marg.hom: Marginal Homogeneity Models

Description

marg.hom fits a marginal homogeneity model to a contingency table that has two margins of equal size.

Usage

marg.hom(freq, marg1, marg2)

Value

A list containing the call, the model, the deviance, the degrees of freedom, the aic, the fitted values, and the residuals is returned.

Arguments

freq

Vector of frequencies

marg1

Factor variable for the first margin

marg2

Factor variable for the second margin

Author

J.K. Lindsey

Examples

Run this code

# 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