Learn R Programming

BinaryEPPM (version 3.0)

plot.BinaryEPPM: Diagnostic Plots for BinaryEPPM Objects

Description

This function is generic. Various types of standard diagnostic plots can be produced, involving various types of residuals, influence measures etc. It is a minorly modified version of the generic plot function of betareg with details of the displays given in Cribari-Neto and Zeileis (2010). The same six displays and arguments list as in Cribari-Neto and Zeileis (2010) are used. The six displays are "Residuals vs indices of obs", "Cook's distance plot", "Leverage vs predicted values", "Residuals vs linear predictor", "Normal Q-Q plot of residuals", "Predicted vs observed values".

Usage

# S3 method for BinaryEPPM
plot(x, which = 1:4,
    caption = c("Residuals vs indices of obs.", "Cook's distance plot",
    "Leverage vs predicted values", "Residuals vs linear predictor",
    "Normal Q-Q plot of residuals", "Predicted vs observed values"),
    sub.caption = " ", main = "", 
    ask = prod(par("mfcol"), 1) < length(which) && dev.interactive(),
    ..., type = "spearson")

Value

No return value.

Arguments

x

fitted model object of class "BinaryEPPM".

which

numeric. If a subset of plots is required, specify a subset of the numbers 1:6.

caption

character. Captions to appear above the plots.

sub.caption

character. Common title-above figures if there are multiple.

main

character. Title to each plot in addition to the above caption.

ask

logical. If true, the user is asked before each plot.

...

other parameters to be passed through to plotting functions.

type

character indicating type of residual to be used, see residuals.BinaryEPPM.

Author

David M. Smith <dmccsmith@verizon.net>

Details

The plot method for BinaryEPPM objects produces various plots of diagnostic plots similar to those produced by betareg. See Cribari-Neto and Zeileis (2010) for further details of the displays of betareg.

References

Cribari-Neto F, Zeileis A. (2010). Beta Regression in R. Journal of Statistical Software, 34(2), 1-24. tools:::Rd_expr_doi("10.18637/jss.v034.i02").

See Also

plot.betareg

Examples

Run this code
data("ropespores.case") 
output.fn <- BinaryEPPM(data = ropespores.case,
                  number.spores / number.tested ~ 1 + offset(logdilution),
                  model.type = 'p only', model.name = 'binomial')  
plot.BinaryEPPM(output.fn, which = 1, type= "sdeviance")

Run the code above in your browser using DataLab