Constructs a quantile-quantile (Q-Q) plot for fitted model as a graphical
check of goodness of fit. Formal goodness of fit testing for detection
function models using Kolmogorov-Smirnov and Cramer-von Mises tests. Both
tests are based on looking at the quantile-quantile plot produced by
qqplot.ddf
and deviations from the line x=y.
qqplot.ddf(model, plot = TRUE, nboot = 100, ks = FALSE, ...)
A list of goodness of fit related values:
matrix of lower and upper empirical distribution function values
fitted cumulative distribution function values
list with K-S statistic
(Dn
) and p-value (p
)
list with CvM statistic
(W
) and p-value (p
)
fitted distance detection function model object
the Q-Q plot be plotted or just report statistics?
number of replicates to use to calculate p-values for the goodness of fit test statistics
perform the Kolmogorov-Smirnov test (this involves many bootstraps so can take a while)
additional arguments passed to plot
Jeff Laake, David L Miller
Note that a bootstrap procedure is required to ensure that the p-values from the procedure are correct as the we are comparing the cumulative distribution function (CDF) and empirical distribution function (EDF) and we have estimated the parameters of the detection function.
Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.A. Marques, J.R.B. Bishop, and L. Thomas. 2004. Further topics in distance sampling. pp: 385-389. In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University Press.
ddf.gof
, cdf.ds