Learn R Programming

predint (version 2.2.1)

plot.predint: Plots of predint objects

Description

This function provides methodology for plotting the prediction intervals or limits that are calculated using the functionality of the predint package.

Usage

# S3 method for predint
plot(x, ..., size = 4, width = 0.05, alpha = 0.5)

Value

Since plot.predint() is based on ggplot2::ggplot, it returns an object of class c("gg", "ggplot").

Arguments

x

object of class predint

...

arguments handed over to ggplot2::aes()

size

size of the dots

width

margin of jittering

alpha

opacity of dot colors

Examples

Run this code
### PI for quasi-Poisson data
pred_int <- quasi_pois_pi(histdat=ames_HCD,
                          newoffset=3,
                          nboot=100,
                          traceplot = FALSE)

### Plot the PI
plot(pred_int)

### Since plot.predint is based on ggplot, the grafic can be altered using
# the methodology provided via ggplot2
plot(pred_int)+
     theme_classic()

Run the code above in your browser using DataLab