Learn R Programming

secr (version 5.0.0)

plot.MCgof: Methods for MCgof Objects

Description

Plot, summary and print methods for MCgof objects.

Usage

# 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, ...)

Value

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

Arguments

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 points for plotting overlay

object

MCgof object

Details

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 --

CountMarginCell value
yikindividual x detector\(y_{ik} = \sum_j y_{ijk}\)
yiindividual\(y_i = \sum_j \sum_k y_{ijk}\)
ykdetector\(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.

References

Gelman, A., Meng, X.-L., and Stern, H. (1996) Posterior predictive assessment of model fitness via realized discrepancies. Statistica Sinica 6, 733--807.

See Also

MCgof