Skip to contents

Provides a summary of the excodeModel object, containing the results for those time points where excess count detection was performed. By default, the summary includes model-based expectations, posterior probabilities, p-values, and their corresponding signal thresholds, computed according to the model specification.

Usage

# S4 method for excodeModel
summary(
  object,
  pars = c("posterior", "pval", "date", "timepoint", "observed", "emission", "id", "BIC",
    "AIC"),
  prob_threshold = 0.5,
  pval_threshold = 0.01,
  maxiter = 1000
)

Arguments

object

An object of class excodeModel. The fitted model to summarize.

pars

Character vector. Specifies which parameters or variables to extract and include in the summary. Typical entries include: "posterior", "pval", "date", "timepoint", "observed", "emission", "id", "BIC", "AIC". Default includes all.

prob_threshold

Numeric. Posterior probability threshold used to calculate the upper bound for the expected number of cases under the posterior. This value controls the sensitivity of alarm detection: a lower prob_threshold results in a lower posterior_ub. The computed upper bound is returned in the posterior_ub column of the summary output. Observations with a posterior probability greater than or equal to this threshold are marked as excess count. Default is 0.5.

pval_threshold

Numeric. p-value threshold used used to calculate the upper bound for the expected number of cases using quantiles based on the p-value. This threshold determines the sensitivity of detection: lower values result in more conservative signal classification. It is used to compute the pval_ub column in the summary output. Observations with a p-value less than or equal to this threshold are marked as excess counts. Default is 0.01.

maxiter

Integer. Maximum number of iterations to use when estimating the posterior alarm threshold. Default is 1000.

Value

A data.frame summarizing the selected components of the excodeModel, including expected values, posterior, p-value, and model fit metrics (such as AIC and BIC) depending on the values of pars.

Examples


# Looking at summary of the results using a harmonic Poisson model on the shadar_df
if (FALSE) {
#' excode_family_pois <- excodeFamily("Poisson")
excode_formula_har <- excodeFormula("Harmonic")
excode_har_pois <- excodeModel(excode_family_pois, excode_formula_har)
# perform excess count detection for time points 209:295
result_shadar_har <- run_excode(shadar_df, excode_har_pois, 209:295)
# obtain the summary of the results for the time points 209:295
summary(result_shadar_har)
}