mygllm: Generalized Log-Linear Fitting

View source: R/mygllm.r

mygllmR Documentation

Generalized Log-Linear Fitting

Description

Fits a log-linear model for collapsed contingency tables.

Usage

mygllm(y, s, X, maxit = 1000, tol = 1e-05, E = rep(1, length(s)))

Arguments

y

Vector of observed cell frequencies.

s

Scatter matrix. s[i] is the cell in the observed array that corresponds to cell i in the full array.

X

Design matrix.

maxit

Maximum number of iterations.

tol

Convergence parameter.

E

Full contingency table. Should be initialized with either ones or a priori estimates.

Details

This is an implementation and extension of the algorithm published by Haber (1984). It also incorporates ideas of David Duffy (see references).

A priori estimates of the full contingency table can be given as start values by argument E. This can reduce execution time significantly.

Value

Estimated full contingency table.

Author(s)

Andreas Borg, Murat Sariyar

References

Michael Haber, Algorithm AS 207: Fitting a General Log-Linear Model, in: Applied Statistics 33 (1984) No. 3, 358–362.

David Duffy: gllm: Generalised log-linear model. R package version 0.31. https://cran.r-project.org/package=gllm

See Also

emWeights, which makes use of log-linear fitting for weight calculation.


RecordLinkage documentation built on Nov. 10, 2022, 5:42 p.m.