
lvplot.qrrvglm(object, varlvI = FALSE, reference = NULL,
add = FALSE, plot.it = TRUE,
rug = TRUE, y = FALSE, type = c("fitted.values", "predictors"),
xlab = paste("Latent Variable", if (Rank == 1) "" else " 1", sep = ""),
ylab = if (Rank == 1) switch(type, predictors = "Predictors",
fitted.values = "Fitted values") else "Latent Variable 2",
pcex = par()$cex, pcol = par()$col, pch = par()$pch,
llty = par()$lty, lcol = par()$col, llwd = par()$lwd,
label.arg = FALSE, adj.arg = -0.1,
ellipse = 0.95, Absolute = FALSE,
elty = par()$lty, ecol = par()$col, elwd = par()$lwd, egrid = 200,
chull.arg = FALSE, clty = 2, ccol = par()$col, clwd = par()$lwd,
cpch = " ",
C = FALSE, OriginC = c("origin", "mean"),
Clty = par()$lty, Ccol = par()$col, Clwd = par()$lwd,
Ccex = par()$cex, Cadj.arg = -0.1, stretchC = 1,
sites = FALSE, spch = NULL, scol = par()$col, scex = par()$cex,
sfont = par()$font, check.ok = TRUE, ...)
Coef.qrrvglm
.Coef.qrrvglm
.FALSE
, a new
plot is made.TRUE
, a rug plot is plotted at the
foot of the plot (applies to rank-1 models only).
These values are jittered to expose ties.TRUE
, the responses will be plotted
(applies only to rank-1 models and if type="fitted.values"
.)"fitted.values"
or "predictors"
,
specifies whether the y-axis is on the response or eta-scales
respectively.par
.par
.cex
argument in par
.col
argument in par
.par
.
The pch
argument can be of length $M$, the number of spelty
argument of par
.col
argument of par
.lwd
argument of par
.adj
argument of par
.Absolute
is TRUE
then ellipse
should be
assigned a value that is used for the elliptical contouring.
If Absolute
is TRUE
, the contours corresponding to ellipse
are on an absolute scale.
If FALSE
, the contours corresponding to ellipse
are on a relative scale.lty
argument of par
.col
argument of par
.lwd
argument of par
.lty
argument of par
.col
argument of par
.lwd
argument of par
.pch
argument of par<
OriginC
) to the plot?"origin"
means c(0,0)
.
The value "
lty
argument of par
.col
argument of par
.lwd
argument of par
.cex
argument of par
.adj
argument of par
.stretchC *
C is used.NULL
means the row labels of the
data frame are used. They often are the site numbers.
See the pch
argument of par
col
argument of par
.cex
argument of par
.font
argument of par
.Norrr = ~ 1
was used.
It doesn't make sense to have a latent variable plot unless this is so.plot
function
when setting up the entire plot. Useful arguments here include
xlim
and ylim
.Norrr = ~ 1
. For unequal-tolerances models, the latent variable axes can be
rotated so that at least one of the tolerance matrices is diagonal;
see Coef.qrrvglm
for details.
Arguments beginning with ``p
'' correspond to the points e.g.,
pcex
and pcol
correspond to the size and color of the
points. Such ``p
'' arguments should be vectors of length 1,
or $n$, the number of sites. For the rank-2 model, arguments
beginning with ``p
'' correspond to the optima.
lvplot
,
persp.qrrvglm
,
Coef.qrrvglm
,
par
,
cqo
.set.seed(123)
x2 = rnorm(n <- 200) # Has mean 0 (needed when ITol=TRUE)
x3 = rnorm(n) # Has mean 0 (needed when ITol=TRUE)
x4 = rnorm(n) # Has mean 0 (needed when ITol=TRUE)
lv1 = x2 + x3 - 2*x4
lv2 = -x2 + x3 + 0*x4 # lv2 is weakly correlated with lv1
lambda1 = exp(6 - 0.5 * (lv1-0)^2 - 0.5 * (lv2-0)^2)
lambda2 = exp(5 - 0.5 * (lv1-1)^2 - 0.5 * (lv2-1)^2)
lambda3 = exp(5 - 0.5 * (lv1+2)^2 - 0.5 * (lv2-0)^2)
spp1 = rpois(n, lambda1)
spp2 = rpois(n, lambda2)
spp3 = rpois(n, lambda3)
set.seed(111)
p2 = cqo(cbind(spp1,spp2,spp3) ~ x2 + x3 + x4, poissonff,
Rank=2, ITolerances=TRUE,
Crow1positive=c(TRUE,FALSE)) # deviance = 505.81
if(deviance(p2) > 506) stop("suboptimal fit obtained")
sort(p2@misc$deviance.Bestof) # A history of the fits
Coef(p2)
lvplot(p2, sites=TRUE, spch="*", scol="darkgreen", scex=1.5,
chull=TRUE, label=TRUE, Absolute=TRUE, ellipse=140,
adj=-0.5, pcol="blue", pcex=1.3, las=1,
C=TRUE, Cadj=c(-.3,-.3,1), Clwd=2, Ccex=1.4, Ccol="red",
main=paste("Contours at Abundance=140 with",
"convex hull of the site scores"))
var(lv(p2)) # A diagonal matrix, i.e., uncorrelated latent variables
var(lv(p2, varlvI=TRUE)) # Identity matrix
Tol(p2)[,,1:2] # Identity matrix
Tol(p2, varlvI=TRUE)[,,1:2] # A diagonal matrix
Run the code above in your browser using DataLab