plot.gcmr {gcmr} | R Documentation |
Plot Diagnostics for Gaussian Copula Marginal Regression
Description
Various types of diagnostic plots for Gaussian copula regression.
Usage
## S3 method for class 'gcmr'
plot(x, which = if (!time.series) 1:4 else c(1, 3, 5, 6),
caption = c("Residuals vs indices of obs.", "Residuals vs linear predictor",
"Normal plot of residuals", "Predicted vs observed values",
"Autocorrelation plot of residuals", "Partial ACF plot of residuals"),
main = "", ask = prod(par("mfcol")) < length(which) && dev.interactive(),
level = 0.95, col.lines = "gray",
time.series = inherits(x$cormat, "arma.gcmr"), ...)
Arguments
x |
a fitted model object of class |
which |
select one, or more, of the six available plots. The default choice adapts to the correlation structure and selects four plots depending on the fact that the data are a regular time series or not. |
caption |
captions to appear above the plots. |
main |
title to each plot in addition to the above caption. |
ask |
if |
level |
confidence level in the normal probability plot. The default is |
col.lines |
color for lines. The default is |
time.series |
if |
... |
other parameters to be passed through to plotting functions. |
Details
The plot method for gcmr
objects produces six types of diagnostic plots selectable through the which
argument. Available choices are: Quantile residuals vs indices of the observations (which=1
); Quantile residuals vs linear predictor (which=2
); Normal probability plot of quantile residuals (which=3
); Fitted vs observed values (which=4
); Autocorrelation plot of quantile residuals (which=5
); Partial autocorrelation plot of quantile residuals (which=6
). The latter two plots make sense for regular time series data only.
The normal probability plot is computed via function qqPlot
from the package car
(Fox and Weisberg, 2011).
Author(s)
Guido Masarotto and Cristiano Varin.
References
Fox, J. and Weisberg, S. (2011). An R Companion to Applied Regression. Second Edition. Thousand Oaks CA: Sage.
Masarotto, G. and Varin, C. (2012). Gaussian copula marginal regression. Electronic Journal of Statistics 6, 1517–1549.
Masarotto, G. and Varin C. (2017). Gaussian Copula Regression in R. Journal of Statistical Software, 77(8), 1–26.
See Also
gcmr
.
Examples
## beta regression with ARMA(1,3) errors
data(HUR)
trend <- scale(time(HUR))
m <- gcmr(HUR ~ trend | trend, marginal = beta.marg, cormat = arma.cormat(1, 3))
## normal probability plot
plot(m, 3)
## autocorrelation function of residuals
plot(m, 5)