noRRR = ~ 1
.trplot.qrrvglm(object, whichSpecies = NULL, add=FALSE, plot.it = TRUE,
label.sites = FALSE, sitenames = rownames(object@y),
axes.equal = TRUE, cex = par()$cex,
col = 1:(nos * (nos - 1)/2), log = "",
lty = rep(par()$lty, length.out = nos * (nos - 1)/2),
lwd = rep(par()$lwd, length.out = nos * (nos - 1)/2),
tcol = rep(par()$col, length.out = nos * (nos - 1)/2),
xlab = NULL, ylab = NULL,
main = "", type = "b", check.ok = TRUE, ...)
"qrrvglm"
, i.e., a CQO object.FALSE
(default),
a new plot is made.TRUE
, the points on the
curves/trajectories are labelled with the sitenames
.TRUE
, the x- and y-axes
will be on the same scale.label.sites
is TRUE
.
See the cex
argument in par
.col
argument in par
.
Here, nos
is the number of species.log
argument in par
.lty
argument of par
.lwd
argument of par
.col
argument in par
.
Used only if label.sites
is TRUE
.type="l"
for lines only.
See the type
argument of plot
.noRRR = ~ 1
was used.
It doesn't make sense to have a trace plot unless this is so.plot
function
when setting up the entire plot. Useful arguments here include
xlim
and ylim
.whichSpecies
must
therefore contain at least two species. By default, all of the
species that were fitted in object
are plotted.
With more than a few species
the resulting plot will be very congested, and so it is recommended
that only a few species be selected for plotting.In the above, $M$ is the number of species selected for plotting, so there will be $M(M-1)/2$ curves/trajectories in total.
A trajectory plot will be fitted only if noRRR = ~ 1
because
otherwise the trajectory will not be a smooth function of the latent
variables.
cqo
,
par
,
title
.set.seed(111) # This leads to the global solution
# hspider[,1:6] <- scale(hspider[,1:6]) # Standardize the environmental variables
p1 <- cqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute, Arctperi, Auloalbi,
Pardlugu, Pardmont, Pardnigr, Pardpull, Trocterr, Zoraspin) ~
WaterCon + BareSand + FallTwig + CoveMoss + CoveHerb + ReflLux,
poissonff, data = hspider, trace = FALSE)
trplot(p1, whichSpecies = 1:3, log = "xy", type = "b", lty = 1,
main = "Trajectory plot of three hunting spiders species",
col = c("blue","red","green"), lwd = 2, label = TRUE) -> ii
legend(0.00005, 0.3, lwd = 2, lty = 1, col = c("blue", "red", "green"),
with(ii, paste(species.names[,1], species.names[,2], sep = " and ")))
abline(a = 0, b = 1, lty = "dashed", col = "grey") # Useful reference line
Run the code above in your browser using DataLab