selm fitsselm
and mselm generated by a call to function selm## S3 method for class '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) ## S3 method for class '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)
selm or mselm."CP" (default), "DP",
"pseudo-CP". The various type of residuals only differ by an
a1:4; see points,
panel.smooth can be chosen by add.smooth = TRUE.TRUE, the user is asked before each plot.NULL uses observation numbers..TRUE).panel above.caption.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 QQ-plot and
PP-plot, DP-residuals are used irrespectively of
param.type; see Section 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 code{which} is 2:4 if p>1, otherwise
c(1,3,4).
Value which=3 produces a QQ-plot, 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 PP-plot, working in a similar
fashion.
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, 367-389.
Full-length version available at
Azzalini, A. with the collaboration of Capitanio, A. (2014). The Skew-Normal and Related Families. Cambridge University Press, IMS Monographs series.
selm, dp2cpdata(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)Run the code above in your browser using DataLab