Learn R Programming

secr (version 4.6.10)

secrtest: Goodness-of-fit Test Results

Description

S3 class for results from secr.test.

Usage

# S3 method for secrtest
print(x, terse = TRUE, ...)
# S3 method for secrtest
plot(x, stat, ...)

Arguments

x

secrtest object from secr.test

terse

logical; if TRUE only p values are displayed

stat

character; names of statistics to plot (default: all)

...

other arguments passed to hist by plot.secrtest

Details

An `secrtest' object is output from secr.test.

plot.secrtest plots a histogram of the simulated values.

If plot.secrtest is applied to an object with more than one statistic then multiple plots are produced, so a multi-figure layout should be prepared (par(mfrow = c(1,2)) for 2 plots side by side). Include the hist argument main = '' to suppress the ugly plot labels, and ensure each statistic is named by statfn so that the x-axis is labelled correctly (See the Examples in help for secr.test).

See Also

secr.test

Examples

Run this code

if (FALSE) {

tmp <- secr.test(ovenbird.model.1)
if (inherits(tmp, 'secrtest')) {
    tmp  ## terse print
    print(tmp, terse = FALSE)
    par(mfrow = c(1,5))
    plot(tmp, main = '', xlim=c(0,1), breaks=seq(0,1,0.05))
    par(mfrow = c(1,1))    ## reset to default
}

}

Run the code above in your browser using DataLab