Plot, summary and print methods for MCgof objects.
# S3 method for MCgof
plot(x, counts = 'all', overlay = NULL, maxT = NULL,
main = NULL, cex = 0.9, ...)# S3 method for MCgof
hist(x, counts = 'all', maxT = NULL, main = NULL,
cex = 0.9, ...)
# S3 method for MCgof
summary(object, ...)
# S3 method for MCgof
print(x, ...)
The summary method returns a matrix of values in which the columns correspond to the different statistics (default yik, yi, yk) and the rows are
median discrepancy Tobs
median discrepancy Tsim
proportion Tobs>Tsim
number of valid results
MCgof object
character vector of marginal counts for which statistics are to be plotted
MCgof object
numeric maximum plotted value of statistic
character vector of labels (see Details)
numeric size of labels and points
other arguments passed by the plot method to points
for plotting overlay
MCgof object
We start with a 3-D capthist array with dimensions corresponding to individuals (i), occasions (j) and detectors (k). The possible marginal counts for the default `statfn' in MCgof
are designated --
Count | Margin | Cell value |
yik | individual x detector | \(y_{ik} = \sum_j y_{ijk}\) |
yi | individual | \(y_i = \sum_j \sum_k y_{ijk}\) |
yk | detector | \(y_k = \sum_j \sum_i y_{ijk}\) |
The plot method displays a scatterplot of discrepancies for observed and simulated data (one point per replicate) (Gelman et al. 1996).
If `overlay' is provided then the results are overlaid on the initial plot. Points should be distinguished by specifying a different colour (col) or symbol (pch) with the ... argument.
`main' is a vector of labels used as headers; the names should include all components of `statfn'. Setting main = "" suppresses headers.
The hist method displays a histogram of the ratio Tobs/Tsim.
Gelman, A., Meng, X.-L., and Stern, H. (1996) Posterior predictive assessment of model fitness via realized discrepancies. Statistica Sinica 6, 733--807.
MCgof