CM.equid: Constraint Matrices for Symmetry, Order, Parallelism, etc.

View source: R/family.categorical.R

CM.equidR Documentation

Constraint Matrices for Symmetry, Order, Parallelism, etc.

Description

Given M linear/additive predictors, construct the constraint matrices to allow symmetry, (linear and normal) ordering, etc. in terms such as the intercept.

Usage

CM.equid(M, Trev = FALSE, Tref = 1)
 CM.free(M, Trev = FALSE, Tref = 1)
 CM.ones(M, Trev = FALSE, Tref = 1)
CM.symm0(M, Trev = FALSE, Tref = 1)
CM.symm1(M, Trev = FALSE, Tref = 1)
CM.qnorm(M, Trev = FALSE, Tref = 1)

Arguments

M

Number of linear/additive predictors, usually >1.

Tref

Reference level for the threshold, this should be a single value from 1:M. This argument is ignored by some of the above functions.

Trev

Logical. Apply reverse direction for the thresholds direction? This argument is ignored by some of the above functions.

Details

A constraint matrix is M \times R where R is its rank and usually the elements are 0, 1 or -1. There is a constraint matrix for each column of the LM matrix used to fit the vglm. They are used to apportion the regression coefficients to the linear predictors, e.g., parallelism, exchangeability, etc. The functions described here are intended to construct constraint matrices easily for symmetry constraints and linear ordering etc. They are potentially useful for categorical data analysis (e.g., cumulative, multinomial), especially for the intercept term. When applied to cumulative, they are sometimes called structured thresholds, e.g., ordinal.

One example is the stereotype model proposed by Anderson (1984) (see multinomial and rrvglm) where the elements of the A matrix are ordered. This is not fully possible in VGAM but some special cases can be fitted, e.g., use CM.equid to create a linear ordering. And CM.symm1 might result in fully ordered estimates too, etc.

CM.free creates free or unconstrained estimates. It is almost always the case for VGLMs, and is simply diag(M).

CM.ones creates equal estimates, which is also known as the parallelism assumption in models such as cumulative. It gets its name because the constraint matrix is simply matrix(1, M, 1).

CM.equid creates equidistant estimates. This is a linear scaling, and the direction and origin are controlled by Treverse and Tref respectively.

CM.qnorm and CM.qlogis are based on qnorm and qlogis. For example, CM.qnorm(M) is essentially cbind(qnorm(seq(M) / (M + 1))). This might be useful with a model with probitlink applied to multiple intercepts.

Further details can be found at cumulative and CommonVGAMffArguments,

Value

A constraint matrix.

See Also

CommonVGAMffArguments, cumulative, acat, cratio, sratio, multinomial.

Examples

CM.equid(4)
CM.equid(4, Trev = TRUE, Tref = 3)
CM.symm1(5)
CM.symm0(5)
CM.qnorm(5)

VGAM documentation built on Sept. 18, 2024, 9:09 a.m.