.BG
.FN loglin
.TL
Contingency Table Analysis
.CS
loglin(table, margin, start, eps=.1,
       iter=20, print=TRUE)
.AG table
contingency table (array) to be fit by log-linear model.
Table values must be non-negative.
.AG margins
vector describing the marginal totals to be fit.  A margin
is described by the factors not summed over, and margins are
separated by zeroes. Thus `c(1,2,0,3,4)' would indicate
fitting the 1,2 margin (summing over variables 3 and 4) and
the 3,4 margin in a four-way table.
.AG start
starting estimate for fitted table. If `start' is omitted, a
start is used that will assure convergence.  If structural
zeroes appear in `table', `start' should contain zeroes in
corresponding entries, ones in other places.  This assures
that the fit will contain those zeroes.
.AG eps
maximum permissible deviation between observed and fitted
margins.
.AG iter
maximum number of iterations.
.AG print
flag; if `TRUE', the final deviation and number
of iterations will be printed.
.RT
array like `table', but containing fitted values.
.SP
.SH REFERENCE
S. J. Haberman,
"Log-linear Fit for Contingency Tables\(emAlgorithm AS51,"
.ul
Applied Statistics,
Vol. 21, No. 2, pp. 218-225, 1972.
.KW array
.KW multivariate
.KW category
.WR
