PIT_ggPlot: ggplot version of PIT Plots for a iZIP Object

Description Usage Arguments Details References See Also Examples

Description

Two plots for the non-randomized PIT are currently available for checking the distributional assumption of the fitted iZIP model: the PIT histogram, and the uniform Q-Q plot for PIT.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
gg_histizipPIT(
  object,
  bins = 10,
  ref_line = TRUE,
  col_line = "red",
  col_hist = "royal blue",
  size = 1
)

gg_qqizipPIT(
  object,
  bins = 10,
  col1 = "red",
  col2 = "#999999",
  lty1 = 1,
  lty2 = 2
)

Arguments

object

an object class "izip", obtained from a call to glm.izip.

bins

numeric; the number of bins shown in the PIT histogram or the PIT Q-Q plot.

ref_line

logical; if TRUE (default), the line for displaying the standard uniform distribution will be shown for the purpose of comparison.

col_line

numeric or character: the colour of the reference line for comparison in PIT histogram.

col_hist

numeric or character; the colour of the histogram for PIT.

size

numeric; the line widths for the comparison line in PIT histogram.

col1

numeric or character; the colour of the sample uniform Q-Q plot in PIT.

col2

numeric or character; the colour of the theoretical uniform Q-Q plot in PIT.

lty1

integer or character string: the line types for the sample uniform Q-Q plot in PIT, see ggplot2::linetype.

lty2

an integer or character string: the line types for the theoretical uniform Q-Q plot in PIT, see ggplot2::linetype.

Details

histizipPIT and qqizipPIT

The histogram and the Q-Q plot are used to compare the fitted profile with a standard uniform distribution. If they match relatively well, it means the iZIP distribution is appropriate for the data.

The histizipPIT and qqizipPIT functions would provide the same two plots but in base R format.

References

Czado, C., Gneiting, T. and Held, L. (2009). Predictive model assessment for count data. Biometrics, 65, 1254–1261.

Dunsmuir, W.T.M. and Scott, D.J. (2015). The glarma Package for Observation-Driven Time Series Regression of Counts. Journal of Statistical Software, 67, 1–36.

See Also

histizipPIT, qqizipPIT, plot.izip and autoplot.izip.

Examples

1
## For examples see example(autoplot)

thomas-fung/izipr documentation built on Dec. 23, 2021, 9:57 a.m.