![]() | ||
In statistics, the class of vector generalized linear models (VGLMs) was proposed to enlarge the scope of models catered for by generalized linear models (GLMs). In particular, VGLMs allow for response variables outside the classical exponential family and for more than one parameter. Each parameter (not necessarily a mean) can be transformed by a link function. The VGLM framework is also large enough to naturally accommodate multiple responses; these are several independent responses each coming from a particular statistical distribution with possibly different parameter values.
Contents
- Motivation
- Data and notation
- Model components
- Linear predictors
- Link functions
- Constraint matrices
- The xij facility
- Software
- Maximum likelihood
- VLM
- Generalized linear models
- Ordered categorical response
- Unordered categorical response
- Count data
- Reduced rank vector generalized linear models
- Two to one
- RCIMs
- Vector generalized additive models
- Quadratic reduced rank vector generalized linear models
- References
Vector generalized linear models are described in detail in Yee (2015). The central algorithm adopted is the iteratively reweighted least squares method, for maximum likelihood estimation of usually all the model parameters. In particular, Fisher scoring is implemented by such, which, for most models, uses the first and expected second derivatives of the log-likelihood function.
Motivation
GLMs essentially cover one-parameter models from the classical exponential family, and include 3 of the most important statistical regression models: the linear model, Poisson regression for counts, and logistic regression for binary responses. However, the exponential family is far too limiting for regular data analysis. For example, for counts, zero-inflation, zero-truncation and overdispersion are regularly encountered, and the makeshift adaptations made to the binomial and Poisson models in the form of quasi-binomial and quasi-Poisson can be argued as being ad hoc and unsatisfactory. But the VGLM framework readily handles models such as zero-inflated Poisson regression, zero-altered Poisson (hurdle) regression, positive-Poisson regression, and negative binomial regression. As another example, for the linear model, the variance of a normal distribution is relegated as a scale parameter and it is treated often as a nuisance parameter (if it is considered as a parameter at all). But the VGLM framework allows the variance to be modelled using covariates.
As a whole, one can loosely think of VGLMs as GLMs that handle many models outside the classical exponential family and are not restricted to estimating a single mean. During estimation, rather than using weighted least squares during IRLS, one uses generalized least squares to handle the correlation between the M linear predictors.
Data and notation
We suppose that the response or outcome or the dependent variable(s),
Sometimes we write our data as
The explanatory or independent variables are written
Actually, the VGLM framework allows for S responses, each of dimension vglm(cbind(y1, y2, y3) ~ x2 + x3, ..., data = mydata)
for S = 3. To simplify things, most of this article has S = 1.
Model components
The VGLM usually consists of four elements:
1. A probability density function or probability mass function from some statistical distribution which has a log-likelihoodLinear predictors
Each linear predictor is a quantity which incorporates information about the independent variables into the model. The symbol
The jth parameter,
Let
Link functions
Each link function provides the relationship between a linear predictor and a parameter of the distribution. There are many commonly used link functions, and their choice can be somewhat arbitrary. It makes sense to try to match the domain of the link function to the range of the distribution's parameter value. Notice above that the VGAM
package has function identitylink()
for parameters that can assume both positive and negative values.
Constraint matrices
More generally, the VGLM framework allows for any linear constraints between the regression coefficients
where the
The unknown parameters,
The xij facility
With even more generally, one can allow the value of a variable xij
facility of VGAM
allows one to generalize
The most general formula is
Here the VGAM
package has an xij
argument that allows the successive elements of the diagonal matrix to be inputted.
Software
Yee (2015) describes an R package implementation in the called VGAM. Currently this software fits approximately 150 models/distributions. The central modelling functions are vglm()
and vgam()
. The family
argument is assigned a VGAM family function, e.g., family = negbinomial
for negative binomial regression, family = poissonff
for Poisson regression, family = propodds
for the proportional odd model or cumulative logit model for ordinal categorical regression.
Maximum likelihood
We are maximizing a log-likelihood
where the
where
VLM
For the computation, the (small) model matrix constructed from the RHS of the formula in vglm()
and the constraint matrices are combined to form a big model matrix. The IRLS is applied to this big X. This matrix is known as the VLM matrix, since the vector linear model is the underlying least squares problem being solved. A VLM is a weighted multivariate regression where the variance-covariance matrix for each row of the response matrix is not necessarily the same, and is known. (In classical multivariate regression, all the errors have the same variance-covariance matrix, and it is unknown). In particular, the VLM minimizes the weighted sum of squares
This quantity is minimized at each IRLS iteration. The working responses (also known as pseudo-response and adjusted dependent vectors) are
where the
Computationally, the Cholesky decomposition is used to invert the working weight matrices and to convert the overall generalized least squares problem into an ordinary least squares problem.
Generalized linear models
Of course, all generalized linear models are a special cases of VGLMs. But we often estimate all parameters by full maximum likelihood estimation rather than using the method of moments for the scale parameter.
Ordered categorical response
If the response variable is an ordinal measurement with M + 1 levels, then one may fit a model function of the form:
for VGAM
family function cumulative(link = probit)
assigns a probit link to the cumulative probabilities, therefore this model is also called the cumulative probit model. In general they are called cumulative link models.
For categorical and multinomial distributions, the fitted values are an (M + 1)-vector of probabilities, with the property that all probabilities add up to 1. Each probability indicates the likelihood of occurrence of one of the M + 1 possible values.
Unordered categorical response
If the response variable is a nominal measurement, or the data do not satisfy the assumptions of an ordered model, then one may fit a model of the following form:
for VGAM
family function multinomial()
fits the above model, and it has an argument called refLevel
that can be assigned the level used for as the reference group.
Count data
Classical GLM theory performs Poisson regression for count data. The link is typically the logarithm, which is known as the canonical link. The variance function is proportional to the mean:
where the dispersion parameter
In contrast, VGLMs offer a much richer set of models to handle overdispersion with respect to the Poisson, e.g., the negative binomial distribution and several variants thereof. Another count regression model is the generalized Poisson distribution. Other possible models are the zeta distribution and the Zipf distribution.
Reduced-rank vector generalized linear models
RR-VGLMs are VGLMs where a subset of the B matrix is of a lower rank. Without loss of generality, suppose that
It can be shown that RR-VGLMs are simply VGLMs where the constraint matrices for the variables in
In practice, some uniqueness constraints are needed for VGAM
, the rrvglm()
function uses corner constraints by default, which means that the top R rows of
Two to one
A special case of RR-VGLMs is when R = 1 and M = 2. This is dimension reduction from 2 parameters to 1 parameter. Then it can be shown that
where elements
This formula provides a coupling of
This has been called the NB-P variant by some authors. The
Incidentally, several other useful NB variants can also be fitted, with the help of selecting the right combination of constraint matrices. For example, NB − 1, NB − 2 (negbinomial()
default), NB − H; see Yee (2014) and Table 11.3 of Yee (2015).
RCIMs
The subclass of row-column interaction models (RCIMs) has also been proposed; these are a special type of RR-VGLM. RCIMs apply only to a matrix Y response and there are no explicit explanatory variables qvcalc
R package.
RCIMs can be defined as a RR-VGLM applied to Y with
For the Goodman RC association model, we have
Another example of a RCIM is if
In VGAM
, rcim()
and grc()
functions fit the above models. And also Yee and Hadi (2014) show that RCIMs can be used to fit unconstrained quadratic ordination models to species data; this is an example of indirect gradient analysis in ordination (a topic in statistical ecology).
Vector generalized additive models
Vector generalized additive models (VGAMs) are a major extension to VGLMs in which the linear predictor
where VGAM
package. For M > 1 they are actually vector splines, which estimate the component functions in
Currently, work is being done to estimate VGAMs using P-splines of Eilers and Marx (1996) . This allows for several advantages over using smoothing splines and vector backfitting, such as the ability to perform automatic smoothing parameter selection easier.
Quadratic reduced-rank vector generalized linear models
These add on a quadratic in the latent variable to the RR-VGLM class. The result is a bell-shaped curve can be fitted to each response, as a function of the latent variable. For R = 2, one has bell-shaped surfaces as a function of the 2 latent variables---somewhat similar to a bivariate normal distribution. Particular applications of QRR-VGLMs can be found in ecology, in a field of multivariate analysis called ordination.
As a specific rank-1 example of a QRR-VGLM, consider Poisson data with S species. The model for Species s is the Poisson regression
for
QRR-VGLMs fit Gaussian ordination models by maximum likelihood estimation, and they are an example of direct gradient analysis. The cqo()
function in the VGAM
package currently calls optim()
to search for the optimal