Plot Diagnostics for Gaussian Copula Marginal Regression

Description

Various types of diagnostic plots for Gaussian copula regression.

Usage

1
2
3
4
5
6
7
8
## 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 gcmr.

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 TRUE, then the user is asked before each plot.

level

confidence level in the normal probability plot. The default is 0.95.

col.lines

color for lines. The default is "gray".

time.series

if TRUE, four plots suitable for time series data are displayed. The default is TRUE when the correlation matrix corresponds to that of ARMA(p,q) process and FALSE otherwise.

...

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. http://socserv.socsci.mcmaster.ca/jfox/Books/Companion

Masarotto, G. and Varin, C. (2012). Gaussian copula marginal regression. Electronic Journal of Statistics 6, 1517–1549. http://projecteuclid.org/euclid.ejs/1346421603.

See Also

gcmr.

Examples

1
2
3
4
5
6
7
8
## 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)