Calibration for CLO models (RR-VGLMs)

Performs maximum likelihood calibration for constrained and unconstrained quadratic and additive ordination models (CQO and CAO models are better known as QRR-VGLMs and RR-VGAMs respectively).

models, regression
calibrate.rrvglm(object, newdata = NULL,
        type = c("latvar", "predictors", "response", "vcov", "all3or4"),
        initial.vals = NULL, ...)

The fitted rrvglm model.


A data frame with new response data (e.g., new species data). The default is to use the original data used to fit the model; however, the calibration may take a long time to compute because the computations are expensive.


Same as calibrate.qrrvglm. The "all3or4" is for all of them, i.e., all types. For CLO models, "vcov" is unavailable, so all 3 are returned.


Same as calibrate.qrrvglm. The default is a grid defined by arguments in calibrate.rrvglm.control.

Arguments that are fed into calibrate.rrvglm.control.


Given a fitted regression CLO model, maximum likelihood calibration is theoretically easy and elegant. However, the method assumes that all responses are independent. More details and references are given in Yee (2012).

The function optim is used to search for the maximum likelihood solution. Good initial values are needed, and calibrate.rrvglm.control allows the user some control over the choice of these.

It is found empirically that the stereotype model (also known as a reduced-rank multinomial logit model) calibrates well only with grouped data. When the response vector is all 0s except for one 1, then the MLE will probably be at -Inf or +Inf.


See calibrate.qrrvglm.


This function assumes that the prior weights are all unity; see weightsvglm.

This function is computationally expensive for Rank >= 1, and since it uses a for() loop several times it can be slow. Setting trace = TRUE to get a running log is a good idea.

See Also

calibrate.qrrvglm, calibrate, rrvglm, weightsvglm.

  • calibrate.rrvglm
# NOT RUN { <- na.omit(  # Overkill!!$dmd       <- with(, round(drinkmaxday))$feethr    <- with(, round(feethour))$sleephr   <- with(, round(sleep))$beats     <- with(, round(pulse))

p2 <- rrvglm(cbind(dmd, feethr, sleephr, beats) ~ age + smokenow +
  depressed + embarrassed + fedup + hurt + miserable +  # 11 psychological
  nofriend + moody + nervous + tense + worry + worrier, # variables
  noRRR = ~ age + smokenow, trace = FALSE, poissonff, data =,
         Rank = 2)
cp2 <- calibrate(p2, new = head(, 9), type = "all", trace = TRUE)

two.cases <-[1:2, ]  # Another example
two.cases$dmd       <- c(4, 10)
two.cases$feethr    <- c(4, 7)
two.cases$sleephr   <- c(7, 8)
two.cases$beats     <- c(62, 71)
cp2b <- calibrate(p2, new = two.cases, type = "all")
# }
Documentation reproduced from package VGAM, version 1.0-4, License: GPL-3

Community examples

Looks like there are no examples yet.