Learn R Programming

gcmr (version 0.7.0)

plot.gcmr: 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 = FALSE, ...)

Arguments

x
a fitted model object of class gcmr.
which
numeric. If a subset of the plots is required, specify a subset of the numbers 1:6.
caption
character. Captions to appear above the plots.
main
character. Title to each plot in addition to the above caption.
ask
logical. If TRUE, the user is asked before each plot.
level
numeric. Confidence level in the normal probability plot. The default is 0.95.
col.lines
color for lines. The default is "gray".
time.series
logical. If TRUE, four plots suitable for time series data are displayed.
...
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.

References

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

Run this code
## 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)

Run the code above in your browser using DataLab