posteriorSummaryOfAUC: Posterior Summary of the AUC of a Multi-scale Occupancy...

View source: R/posteriorSummaryOfAUC.R

posteriorSummaryOfAUCR Documentation

Posterior Summary of the AUC of a Multi-scale Occupancy Model's Predictions

Description

Estimates the posterior mean, median, and 95% credible limits for the AUC of a multi-scale occupancy model's predictions.

Usage

posteriorSummaryOfAUC(fit, burnin = 1, mcError = FALSE,
  outputSummary = FALSE)

Arguments

fit

object of class occModel that contains data and previous state of the model's Markov chain

burnin

initial no. iterations of Markov chain to be omitted from calculations

mcError

logical switch to estimate Monte Carlo standard errors

outputSummary

logical switch to return values of posterior summary statistics

Details

This function estimates the posterior mean, median, and 95% credible limits of the AUC (Area Under the Receiver Operating Characteristic curve) of a multi-scale occupancy model's predictions. The AUC of a model is sometimes used in model selection with higher values of AUC favored over lower values.

Value

Prints estimates of summary statistics for the posterior distribution of the AUC of a multi-scale occupancy model's predictions. If mcError=TRUE, the Monte Carlo standard errors of these estimates are computed. If outputSummary=TRUE, the posterior summaries are returned in a list.

Examples


data(gobyDetectionData)
detections = occData(gobyDetectionData, "site", "sample")
data(gobySurveyData)
gobySurveyData = scaleData(gobySurveyData)  # center and scale numeric covariates

fit1 = occModel(formulaSite          = ~ veg,
                formulaSiteAndSample = ~ sal + twg,
                formulaReplicate     = ~ sal + fish,
                detectionMats        = detections,
                siteData             = gobySurveyData,
                niter                = 1100,
                niterInterval        = 100,
                siteColName = 'site',
                )

posteriorSummaryOfAUC(fit1, burnin=100, mcError=TRUE)

RobertDorazio/eDNAoccupancy documentation built on Sept. 5, 2023, 9:57 a.m.