plot.sdlrm | R Documentation |
This function provides plots for diagnostic analysis of a modified skew discrete Laplace regression fit.
## S3 method for class 'sdlrm'
plot(
x,
which = 1:4,
type = c("quantile", "pearson", "response"),
ask = prod(graphics::par("mfcol")) < length(which) && grDevices::dev.interactive(),
pch = "+",
lty = 2,
...
)
x |
an object of class |
which |
numeric; if a subset of the plots is required, specify a subset
of the numbers |
type |
character; specifies which residual should be produced in the
envelope plot. The available options are |
ask |
logical; if |
pch , lty , ... |
graphical parameters (see |
The plot
method for "sdlrm"
objects provides six types
of diagnostic plots in the following order:
a plot of the residuals against fitted values.
an index plot of the residuals against observation indices.
a normal probability plot of the residuals.
a bar plot with comparisons of the observed and fitted frequencies.
sample autocorrelation function plot of the residuals.
sample partial autocorrelation function plot of the residuals.
The which
argument can be used to select a subset of the implemented plots.
Default is which = 1:4
.
plot
method for "sdlrm"
objects returns six types
of diagnostic plots.
Francisco F. de Queiroz <felipeq@ime.usp.br>
Rodrigo M. R. de Medeiros <rodrigo.matheus@ufrn.br>
## Data set: pss (for description run ?pss)
barplot(table(pss$difference), xlab = "PSS index difference", ylab = "Frequency")
boxplot(pss$difference ~ pss$group, xlab = "Group", ylab = "PSS index difference")
## Fit with a model only for the mean (mode = 1)
fit <- sdlrm(difference ~ group, data = pss, xi = 1)
## Available plots (using the randomized quantile residuals):
# Residuals versus fitted values
plot(fit, which = 1)
# Residuals versus observation indices
plot(fit, which = 2)
# Normal Q-Q plot
plot(fit, which = 3)
# Observed versus fitted frequencies
plot(fit, which = 4)
# Sample autocorelation function of residuals
plot(fit, which = 5)
# Sample partial autocorelation of residuals
plot(fit, which = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.