Learn R Programming

VGAM (version 0.8-3)

calibrate.qrrvglm.control: Control function for CQO/UQO/CAO calibration

Description

Algorithmic constants and parameters for running calibrate.qrrvglm are set using this function.

Usage

calibrate.qrrvglm.control(object, trace = FALSE, Method.optim = "BFGS",
    gridSize = if (Rank == 1) 9 else 5, varlvI = FALSE, ...)

Arguments

object
The fitted CQO/UQO/CAO model. The user should ignore this argument.
trace
Logical indicating if output should be produced for each iteration. It is a good idea to set this argument to be TRUE since the computations are expensive.
Method.optim
Character. Fed into the method argument of optim.
gridSize
Numeric, recycled to length Rank. Controls the resolution of the grid used for initial values. For each latent variable, an equally spaced grid of length gridSize is cast from the smallest site score to the largest site s
varlvI
Logical. For CQO objects only, this argument is fed into Coef.qrrvglm.
...
Avoids an error message for extraneous arguments.

Value

  • A list which with the following components.
  • traceNumeric (even though the input can be logical).
  • gridSizePositive integer.
  • varlvILogical.

Details

Most CQO/CAO users will only need to make use of trace and gridSize. These arguments should be used inside their call to calibrate.qrrvglm, not this function directly.

References

Yee, T. W. (2005) On constrained and unconstrained quadratic ordination. Manuscript in preparation.

See Also

calibrate.qrrvglm, Coef.qrrvglm.

Examples

Run this code
hspider[,1:6] = scale(hspider[,1:6]) # Needed when ITol = TRUE
set.seed(123)
p1 = cqo(cbind(Alopacce, Alopcune, Pardlugu, Pardnigr, 
               Pardpull, Trocterr, Zoraspin) ~
         WaterCon + BareSand + FallTwig +
         CoveMoss + CoveHerb + ReflLux,
         family = poissonff, data = hspider, ITol = TRUE)
sort(p1@misc$deviance.Bestof) # A history of all the iterations

siteNos = 1:2  # Calibrate these sites
cp1 = calibrate(p1, new = data.frame(p1@y[siteNos,]), trace = TRUE)

# Graphically compare the actual site scores with their calibrated values
persp(p1, main = "Site scores: solid=actual, dashed=calibrated",
      label = TRUE, col = "blue", las = 1)
abline(v = lv(p1)[siteNos], lty = 1, col = 1:length(siteNos)) # actual site scores
abline(v = cp1, lty = 2, col = 1:length(siteNos)) # calibrated values

Run the code above in your browser using DataLab