plot.MCgof | R Documentation |
Plot, summary and print methods for MCgof objects.
## S3 method for class 'MCgof'
plot(x, counts = 'all', overlay = NULL, maxT = NULL,
main = NULL, cex = 0.9, ...)
## S3 method for class 'MCgof'
hist(x, counts = 'all', maxT = NULL, main = NULL,
cex = 0.9, ...)
## S3 method for class 'MCgof'
summary(object, ...)
## S3 method for class 'MCgof'
print(x, ...)
x |
MCgof object |
counts |
character vector of marginal counts for which statistics are to be plotted |
overlay |
MCgof object |
maxT |
numeric maximum plotted value of statistic |
main |
character vector of labels (see Details) |
cex |
numeric size of labels and points |
... |
other arguments passed by the plot method to |
object |
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.
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
Gelman, A., Meng, X.-L., and Stern, H. (1996) Posterior predictive assessment of model fitness via realized discrepancies. Statistica Sinica 6, 733–807.
MCgof
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.