| plot.SUNdistr-method | R Documentation |
SUNdistrPlotting method for class SUNdistr
## S4 method for signature 'SUNdistr'
plot(x, range, nlevels = 8, levels, npt, main, comp, compLabs, gap = 0.5, ...)
x |
an object of class |
range |
in the univariate case, a vector of length 2 which defines the plotting range; in the multivariate case, a matrix with two rows where each column defines the plotting range of the corresponding component variable. If missing, a sensible choice is made. |
nlevels |
number of contour levels desired iff levels is not supplied. |
levels |
numeric vector of levels at which to draw contour lines. |
npt |
a numeric value or vector (in the univariate and in the
multivariate case, respectively) to assign the number of evaluation points
of the distribution, on an equally-spaced grid over the |
main |
a character string for main title; if missing, one is built from the available ingredients. |
comp |
an optional integer vector representing the subset of the vector
|
compLabs |
a vector of character strings or expressions used to label
the variables in the plot;
if missing, |
gap |
unused; only present for compatibility with the sn method. |
... |
additional graphical parameters |
For univariate density plots, probs are used to compute quantiles
from the appropriate distribution, and these are superimposed to the plot of
the density function, unless probs=NULL. In the multivariate case,
each bivariate plot is constructed as a collection of contour curves,
one curve for each probability level; consequently, probs cannot be
missing or NULL. The level of the density contour lines are chosen
so that each curve circumscribes a region with the quoted probability,
to a good degree of approssimation; for additional information, see
Azzalini and Capitanio (2014), specifically Complement 5.2 and p.179,
and references therein.
an invisible list. In the univariate case, the list has three components:
the input object representing the distribution and two numeric vectors with
the coordinates of the plotted density values.
In the multivariate case, the list comprises:
the input SUN-class object, the plotting range,
the ggplot2 object encapsulating the plot.
Adelchi Azzalini
makeSUNdistr, SUNdistr-class
xi <- c(1, 0, -1)
Omega <- matrix(c(2,1,1, 1,3,1, 1,1,4), 3, 3)
Delta <- matrix(c(0.72,0.20, 0.51,0.42, 0.88, 0.94), 3, 2, byrow=TRUE)
Gamma <- matrix(c(1, 0.8, 0.8, 1), 2, 2)
dp3 <- list(xi=xi, Omega=Omega, Delta=Delta, tau=c(-0.5, 0), Gamma=Gamma)
sun3 <- makeSUNdistr(dp=dp3, name="SUN3", compNames=c("x", "w", "z"))
plot(sun3, npt=rep(51,3))
p1 <- plot(sun3, comp=1, range=c(-2, 8), col=2, lwd=2/3, lty=3,
main="First marginal component of 'sun3'")
p2 <- plot(sun3, comp=2:3, compLabs=c(expression(x[2]), expression(x[3])))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.