Two plots for the non-randomized PIT are currently available for checking the distributional assumption of the fitted CMP model: the PIT histogram, and the uniform Q-Q plot for PIT.
histcompPIT(
object,
bins = 10,
line = TRUE,
colLine = "red",
colHist = "royal blue",
lwdLine = 2,
main = NULL,
...
)
qqcompPIT(
object,
bins = 10,
col1 = "red",
col2 = "black",
lty1 = 1,
lty2 = 2,
type = "l",
main = NULL,
...
)
an object class "cmp", obtained from a call to glm.cmp
.
numeric; the number of bins shown in the PIT histogram or the PIT Q-Q plot.
logical; if TRUE
(default), the line for displaying the standard
uniform distribution will be shown for the purpose of comparison.
numeric or character: the colour of the line for comparison in PIT histogram.
numeric or character; the colour of the histogram for PIT.
numeric; the line widths for the comparison line in PIT histogram.
character string; a main title for the plot.
other arguments passed to plot.default and plot.ts.
numeric or character; the colour of the sample uniform Q-Q plot in PIT.
numeric or character; the colour of the theoretical uniform Q-Q plot in PIT.
integer or character string: the line types for the sample uniform Q-Q plot in PIT, see par(lty = .).
an integer or character string: the line types for the theoretical uniform Q-Q plot in PIT, see par(lty = .).
1-character string; the type of plot for the sample uniform Q-Q plot in PIT.
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 CMP distribution is appropriate for the data.
The gg_histcompPIT
and gg_qqcompPIT
functions
would provide the same two plots but in ggplot format.
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.
gg_histcompPIT
, gg_qqcompPIT
,
plot.cmp
and autoplot
.
## For examples see example(plot.cmp)