
Draw a two-axis ordination plot for a fitted multivariate model
Source:R/output-methods.R
ordiplot.RdDraws a simple base-R biplot of latent scores, with optional trait loadings
overlaid, for a fit returned by gllvmTMB(). This method is a compatibility
surface for users familiar with gllvm::ordiplot(); the package's richer
ggplot-based model plots are available through plot(fit, type = ...).
Arguments
- fit
A fitted multivariate model returned by
gllvmTMB().- ...
Passed to
plot().- level
"unit"(between-unit) or"unit_obs"(within-unit). Deprecated aliases"B"and"W"are still accepted with a warning.- axes
Length-2 integer vector picking which two latent axes to plot. Default
c(1, 2).- biplot
Logical; if
TRUE, overlay scaled trait loadings as arrows (defaultTRUE).- rotate
Rotation after fitting:
"none"(default),"varimax", or"promax".- ellipse
Logical; if
TRUE, draw an asymptotic-normal score -uncertainty ellipse around every site, fromordination_uncertainty(). Only supported withrotate = "none"(the default) – seeordination_uncertainty()'s Rotation section for why. The ellipse level is unmeasured for coverage; it is a standard Wald construction, not a certified interval.- ellipse_level
Nominal confidence level for the
ellipseoutline (default0.95). Only used whenellipse = TRUE.
Value
Invisibly, a list with the plotted scores matrix and the
corresponding loadings matrix. The function is primarily called for its
plotting side effect.
Details
This is an S3 generic so that dispatch is robust to load order with
the gllvm package — gllvm::ordiplot is itself an S3 generic, and
if it is loaded after gllvmTMB it masks our function. With S3
methods registered, either generic correctly routes a multi-response
fit through the gllvmTMB ordination method.
See also
plot.gllvmTMB_multi() for the available type choices;
ordination_uncertainty() for the covariance ellipse = TRUE draws.