calibrate.qrrvglm(object, newdata = NULL,
type = c("lv", "predictors", "response", "vcov", "all3or4"),
initial.vals = NULL, ...)
"predictors"
are the linear/quadratic or additive
predictors evaluated at the calibrated lanrow(newdata)
, and for rank 2 models
this should be a two column matrix with the number of rows equalling
the number of rows in newdata<
calibrate.qrrvglm.control
.type
determines what is returned.
If type = "all3or4"
then all the type
values are returned
in a list, with the following components.
Each component has length nrow(newdata)
.nrow(newdata)
.trace = TRUE
to get a running log is a good idea.
The function optim
is used to search for
the maximum likelihood solution. Good initial values are
needed, and calibrate.qrrvglm.control
allows the user some control over the choice of these.
ter Braak, C. J. F. 1995. Calibration. In: Data Analysis in Community and Landscape Ecology by Jongman, R. H. G., ter Braak, C. J. F. and van Tongeren, O. F. R. (Eds.) Cambridge University Press, Cambridge.
calibrate.qrrvglm.control
,
calibrate
,
cqo
,
uqo
,
cao
.hspider[,1:6] = scale(hspider[,1:6]) # Standardize the environmental variables
set.seed(123)
p1 = cqo(cbind(Pardlugu, Pardmont, Pardnigr, Pardpull, Zoraspin) ~
WaterCon + BareSand + FallTwig +
CoveMoss + CoveHerb + ReflLux,
family = poissonff, data = hspider, Rank = 1,
IToler = TRUE, Crow1positive = TRUE)
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