Diagnostic plots for selm fits
Description
Diagnostic plots for objects of class selm
and mselm
generated by a call to function selm
Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## S4 method for signature 'selm'
plot(x, param.type="CP", which = c(1:4), caption,
panel = if (add.smooth) panel.smooth else points, main = "",
ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...,
id.n = 3, labels.id = names(x@residuals.dp),
cex.id = 0.75, identline = TRUE, add.smooth = getOption("add.smooth"),
label.pos = c(4, 2), cex.caption = 1)
## S4 method for signature 'mselm'
plot(x, param.type="CP", which, caption,
panel = if (add.smooth) panel.smooth else points, main = "",
ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...,
id.n = 3, labels.id = names(x@residuals.dp),
cex.id = 0.75, identline = TRUE, add.smooth = getOption("add.smooth"),
label.pos = c(4, 2), cex.caption = 1)

Arguments
x 
an object of class 
param.type 
a character string which selects the type of residuals
to be used for some of of the plots;
possible values are: 
which 
if a subset of the plots is required, specify a subset of

caption 
a vector of character strings with captions to appear above the plots. 
panel 
panel function. The useful alternative to 
main 
title to each plot, in addition to the above caption. 
ask 
logical; if 
... 
other parameters to be passed through to plotting functions. 
id.n 
number of points to be labelled in each plot, starting with the most extreme. 
labels.id 
vector of labels, from which the labels for extreme points
will be chosen. 
cex.id 
magnification of point labels. 
identline 
logical indicating if an identity line should be added to
QQplot and PPplot (default: 
add.smooth 
logical indicating if a smoother should be added to most
plots; see also 
label.pos 
positioning of labels, for the left half and right half of the graph respectively, for plots 13. 
cex.caption 
controls the size of 
Details
The meaning of param.type
is described in
dp2cp
. However, for these plot only the first parameter
component is relevant, which affects the location of the residuals; the other
components are not computed. Moreover, for QQplot and
PPplot, DPresiduals are used irrespectively of
param.type
; see Section ‘Background’.
Values which=1
and which=2
have a
different effect for object of class "selm"
and class "mselm"
.
In the univariate case, which=1
plots the residual values versus the
fitted values if p>1
, where p
denotes the number of covariates
including the constant; if p=1
, a boxplot of the response is produced.
Value which=2
produces an histogram of the residuals with superimposed
the fitted curve, when p>1
; if p=1
, a similar plot is generated
using the response variable instead of the residuals. Default value for
which
is 1:4
.
In the multivariate case, which=1
is feasible only if p=1
and it
displays the data scatter with superimposed the fitted distribution. Value
which=2
produces a similar plot but for residuals instead of
data. Default value for codewhich is 2:4
if p>1
, otherwise
c(1,3,4)
.
Value which=3
produces a QQplot, both in the univariate and in the
multivariate case; the difference is that the squares of normalized residuals
and suitably defined Mahalanobis distances, respectively, are used in the two
cases. Similarly, which=4
produces a PPplot, working in a similar
fashion.
Background
Healytype graphical diagnostics, in the form of QQ and PPplots, for the multivariate normal distribution have been extended to the skewnormal distribution by Azzalini and Capitanio (1999, section 6.1), and subsequently to the skewt distribution in Azzalini and Capitanio (2003). A brief explanation in the univariate SN case is provided in Section 3.1.1 of Azzalini and Capitanio (2014); see also Section 3.1.6. For the univariate ST case, see p.102 and p.111 of the monograph. The multivariate case is discussed in Section 5.2.1 as for the SN distribution, in Section 6.2.6 as for the ST distribution.
Author(s)
Adelchi Azzalini
References
Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew normal distribution. J.Roy.Statist.Soc. B 61, 579602. Fulllength version available at http://arXiv.org/abs/0911.2093
Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t distribution. J.Roy. Statist. Soc. B 65, 367389. Fulllength version available at http://arXiv.org/abs/0911.2342
Azzalini, A. with the collaboration of Capitanio, A. (2014). The SkewNormal and Related Families. Cambridge University Press, IMS Monographs series.
See Also
selm
, dp2cp
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  data(wines)
#
m10 < selm(flavanoids ~ 1, family="SN", data=wines, subset=(wine=="Barolo"))
plot(m10)
plot(m10, which=c(1,3)) # fig 3.1 and 3.2(a) of Azzalini and Capitanio (2014)
#
m18 < selm(acidity ~ sugar + nonflavanoids + wine, family="SN", data=wines)
plot(m18)
plot(m18, param.type="DP")
#
m28 < selm(cbind(acidity, alcohol) ~ sugar + nonflavanoids + wine,
family="SN", data=wines)
plot(m28, col=4)
#
data(ais)
m30 < selm(cbind(RCC, Hg, Fe) ~ 1, family="SN", data=ais)
plot(m30, col=2, which=2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.