Learn R Programming

sn (version 1.2-2)

plot.SECdistr: Plotting methods for classes SECdistrUv and SECdistrMv

Description

Methods for classes SECdistrUv and SECdistrMv

Usage

## S3 method for class 'SECdistrUv':
plot(x, range, probs, main, npt = 251, \dots)

## S3 method for class 'SECdistrMv': plot(x, range, probs, npt, landmarks = "auto", main, comp, compLabs, data = NULL, data.par = NULL, gap = 0.5, \dots)

Arguments

x
an object of the pertaining 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 cho
probs
a vector of probability values. In the univariate case, the corresponding quantiles are plotted on the horizontal axis; it can be skipped by setting probs=NULL. In the multivariate case, each probability value corresponds to a co
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 range defined above. Default value: 251 i
landmarks
a character string which affects the placement of some landmark values in the multivariate case, that is, the origin, the mode and the mean (or its substitute pseudo-mean), which are all aligned. Possible values: "proper", "
main
a character string for main title; if missing, one is built from the available ingredients.
comp
a subset of the vector 1:d, if d denotes the dimensionality of the multivariate distribution.
compLabs
a vector of character strings or expressions used to denote the variables in the plot; if missing, slot(object,"compNames") is used.
data
an optional set of data of matching dimensionity of object to be superimposed to the plot. The default value data=NULL produces no effect. In the univariate case, data are plotted using
data.par
an optional list of graphical parameters used for plotting data in the multivariate case, when data is not NULL. Recognized parameters are: col, pch, cex. If missi
gap
a numeric value which regulates the gap between panels of a multivariate plot when d>2.
...
additional graphical parameters

Details

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.

References

Azzalini, A. with the collaboration of Capitanio, A. (2014). The Skew-Normal and Related Families. Cambridge University Press, IMS Monographs series.

See Also

makeSECdistr, summary.SECdistr, dp2cp

Examples

Run this code
# d=1
f1 <- makeSECdistr(dp=c(3,2,5), family="SC", name="Univariate Skew-Cauchy")
plot(f1)
plot(f1, range=c(-3,40), probs=NULL, col=4)
#    
# d=2
Omega2 <- matrix(c(3, -3, -3, 5), 2, 2)    
f2 <-  makeSECdistr(dp=list(c(10,30), Omega=Omega2, alpha=c(-3, 5)),  
                family="sn", name="SN-2d", compNames=c("x1","x2"))
plot(f2)    
x2 <- rmsn(100, dp=slot(f2,"dp"))
plot(f2, main="Distribution 'f2'", probs=c(0.5,0.9), cex.main=1.5, col=2,
  cex=0.8, compLabs=c(expression(x[1]), expression(log(z[2]-beta^{1/3}))), 
  data=x2, data.par=list(col=4, cex=0.6, pch=5))

Run the code above in your browser using DataLab