constraints {VGAM}R Documentation

Constraint Matrices

Description

Returns the constraint matrices of objects in the VGAM package.

Usage

constraints(object, ...)

Arguments

object Some VGAM object, for example, having class vglmff-class.
... Other possible arguments.

Details

Constraint matrices describe the relationship of coefficients/component functions of a particular explanatory variable between the linear/additive predictors in VGLM/VGAM models. For example, they may be all different (constraint matrix is the identity matrix) or all the same (constraint matrix has one column and has unit values).

VGLMs and VGAMs have constraint matrices which are known. The class of RR-VGLMs have constraint matrices which are unknown and are to be estimated.

Value

This extractor function returns a list comprising of constraint matrices—one for each column of the LM model matrix, and in that order. The list is labelled with the variable names. Each constraint matrix has M rows, where M is the number of linear/additive predictors, and whose rank is equal to the number of columns. A model with no constraints at all has an order M identity matrix as each variable's constraint matrix.

Warning

The xij argument changes things, and this has not been fully resolved yet.

Note

In all VGAM family functions zero=NULL means none of the linear/additive predictors are modelled as intercepts-only. Other arguments found in certain VGAM family functions which affect constraint matrices include parallel and exchangeable.

The constraints argument in vglm and vgam allows constraint matrices to be inputted. If so, then constraints(fit) should return the same as the input.

Author(s)

T. W. Yee

References

Yee, T. W. and Wild, C. J. (1996) Vector generalized additive models. Journal of the Royal Statistical Society, Series B, Methodological, 58, 481–493.

Yee, T. W. and Hastie, T. J. (2003) Reduced-rank vector generalized linear models. Statistical Modelling, 3, 15–41.

http://www.stat.auckland.ac.nz/~yee contains additional information.

See Also

VGLMs are described in vglm-class; RR-VGLMs are described in rrvglm-class.

Arguments such as zero and parallel found in many VGAM family functions are a way of creating/modifying constraint matrices conveniently, e.g., see zero.

Examples

# Fit the proportional odds model
data(pneumo)
pneumo = transform(pneumo, let=log(exposure.time))
(fit = vglm(cbind(normal, mild, severe) ~ let,
           cumulative(parallel=TRUE, reverse=TRUE), pneumo))
coef(fit, matrix=TRUE)
constraints(fit)  # Parallel assumption results in this

# Fit a rank-1 stereotype (RR-multinomial logit) model 
data(car.all)
fit = rrvglm(Country ~ Width + Height + HP, multinomial, car.all, Rank=1)
constraints(fit) # All except the first are the A matrix 

[Package VGAM version 0.7-7 Index]