Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

marg.param

Link function of marginal log-linear parameterization


Description

Provides the contrast and marginalization matrices for the marginal parametrization of a probability vector.

Usage

marg.param(lev, type)

Arguments

lev

Integer vector containing the number of levels of each variable.

type

A character vector with elements "l", "g", "c", or "r" indicating the type of logit. The meaning is as follows: "g" for global, "c" for continuation, "r" for reverse continuation and "l" for local.

Details

See Bartolucci, Colombi and Forcina (2007).

Value

C

Matrix of constrasts (the first sum(lev)-length(r) elements are referred to univariate logits)

M

Marginalization matrix with elements 0 and 1.

G

Corresponding design matrix for the corresponding log-linear model.

Note

Assumes that the vector of probabilities is in inv lex order. The interactions are returned in order of dimension, like e.g., 1, 2, 3, 12, 13, 23, 123.

Author(s)

Francesco Bartolucci, Antonio Forcina, Giovanni M. Marchetti

References

Bartolucci, F., Colombi, R. and Forcina, A. (2007). An extended class of marginal link functions for modelling contingency tables by equality and inequality constraints. Statist. Sinica 17, 691-711.

See Also

Examples

marg.param(c(3,3), c("l", "g"))

ggm

Graphical Markov Models with Mixed Graphs

v2.5
GPL-2
Authors
Giovanni M. Marchetti, Mathias Drton, Kayvan Sadeghi
Initial release
2020-02-014

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.