| calibrate.qrrvglm.control {VGAM} | R Documentation |
Algorithmic constants and parameters for running
calibrate.qrrvglm are set using this function.
calibrate.qrrvglm.control(object, trace = FALSE, Method.optim = "BFGS",
gridSize = if (Rank == 1) 9 else 5, varI.latvar = FALSE, ...)
object |
The fitted CQO/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 |
Method.optim |
Character. Fed into the |
gridSize |
Numeric, recycled to length |
varI.latvar |
Logical. For CQO objects only, this argument is fed into
|
... |
Avoids an error message for extraneous arguments. |
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.
A list which with the following components.
trace |
Numeric (even though the input can be logical). |
gridSize |
Positive integer. |
varI.latvar |
Logical. |
Despite the name of this function, CAO models are handled as well.
T. W. Yee
Yee, T. W. (2013) On constrained and unconstrained quadratic ordination. Manuscript in preparation.
calibrate.qrrvglm,
Coef.qrrvglm.
## Not run: hspider[, 1:6] <- scale(hspider[, 1:6]) # Needed when I.tol = TRUE
set.seed(123)
p1 <- cqo(cbind(Alopacce, Alopcune, Pardlugu, Pardnigr,
Pardpull, Trocterr, Zoraspin) ~
WaterCon + BareSand + FallTwig +
CoveMoss + CoveHerb + ReflLux,
family = poissonff, data = hspider, I.tol = TRUE)
sort(deviance(p1, history = TRUE)) # A history of all the iterations
siteNos <- 3:4 # Calibrate these sites
cp1 <- calibrate(p1, new = data.frame(depvar(p1)[siteNos, ]), trace = TRUE)
## End(Not run)
## Not run:
# 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 = latvar(p1)[siteNos], lty = 1,
col = 1:length(siteNos)) # Actual site scores
abline(v = cp1, lty = 2, col = 1:length(siteNos)) # Calibrated values
## End(Not run)