Touchardness Plot: diagnostic distribution plot for the Touchard model.
touplot(x, freq = NULL, plot = TRUE, conf.level = 0.95,
ylab = "Count Metameter", xlab = "Count",
main = "Touchardness Plot", ...)
either a vector of counts or a 1-way table of frequencies of counts.
unnecessary (and ignored) if x
is a table or the raw data; must be provided if x
is
the unique values of the observed counts, in the same order.
logical. Should the plot be displayed?
numeric in (0,1). Confidence level for confidence intervals.
character. Title for the plot.
character. Label for the x axis.
character. Label for the y axis.
other parameters to be passed through to plotting functions.
Returns invisibly a data frame containing the counts (y
),
frequencies (freq
), count metameter (metameter
), the
CI center (CIcenter
) and the CI margin (CImargin
).
Plots the number of occurrences (counts) against the
count metameter of the Touchard distribution.
Circles are the observed count metameters and
the filled points show the confidence interval (dashed lines) centers.
Estimate of \(\lambda\) based on the fitted line
is shown on top margin along with the MLE (toufit
).
If the Touchard model fits the data well, the plot should show a straight line
and the two estimates of \(\lambda\) should be close.
D. C. Hoaglin, F. Mosteller & J. W. Tukey (eds.), Exploring Data Tables, Trends and Shapes, chapter 9. John Wiley & Sons, New York.
M. Friendly & D. Meyer (2015), Discrete Data Analysis with R. Chapman and Hall.
# NOT RUN {
data(Epilepsy)
touplot(seizures)
touplot(seizures, plot=FALSE)
# }
Run the code above in your browser using DataLab