Learn R Programming

LMest (version 2.4.5)

marg_param: Compute marginal parametrization

Description

Function that creates matrices C and M for the marginal parametrization of the probability vector for a vector of categorical variables (internal use)

Usage

marg_param(lev, type)

Arguments

lev

vector containing the number of levels of each variable

type

vector with elements "l", "g", "c", "r" indicating the type of logit

Value

C

matrix of constrats (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