effloglin: Fitting Log-Linear Models by Message Passing

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Fit log-linear models to multidimensional contingency tables by Iterative Proportional Fitting.

Usage

1
2
effloglin(table, margin, fit = FALSE, eps = 0.01, iter = 20,
  print = TRUE)

Arguments

table

A contingency table

margin

A generating class for a hierarchical log–linear model

fit

If TRUE, the fitted values are returned.

eps

Convergence limit; see 'details' below.

iter

Maximum number of iterations allowed

print

If TRUE, iteration details are printed.

Details

The function differs from loglin in that 1) data can be given in the form of a list of sufficient marginals and 2) the model is fitted only on the cliques of the triangulated interaction graph of the model. This means that the full table is not fitted, which means that effloglin is efficient (in terms of storage requirements). However effloglin is implemented entirely in R and is therefore slower than loglin.

Value

A list.

Author(s)

Søren Højsgaard, sorenh@math.aau.dk

See Also

loglin

Examples

1
2
3
4
5
6
data(reinis)
glist <-list(c("smoke", "mental"), c("mental", "phys"), c("phys", "systol"
), c("systol", "smoke"))

stab <- lapply(glist, function(gg) tableMargin(reinis, gg))
fv3 <- effloglin(stab, glist, print=FALSE)

boennecd/gRim documentation built on May 12, 2019, 3:10 p.m.