scanstatistics1.1.2 package

Space-Time Anomaly Detection using Scan Statistics

closest_subsets

Set of increasing sets from left to right of input vector.

connected_neighbors

Find the connected sets for a location and its kk nearest neighbors.

connected_to

Return those elements in the second set which are connected to those i...

coords_to_knn

Get the k nearest neighbors for each location, given its coordinates.

df_to_matrix

Convert a long data frame to a wide matrix.

dist_to_knn

Given a distance matrix, find the kk nearest neighbors.

estimate_baselines

Estimate baselines based on observed counts.

estimate_variances

Estimate variances based on observed counts.

estimate_zip_params

Estimate the parameters of a ZIP distribution.

flexible_zones

Computes the flexibly shaped zones as in Tango (2005).

flipud

Flip a matrix upside down

get_zero_indices

Get indices of zero elements in a vector.

get_zone

Extract a zone from the set of all zones.

gumbel_pvalue

Calculate the Gumbel pp-value for a scan statistic.

has_converged

Is the relative error between two numbers is less than the given toler...

if_connected

Return a set of the location and its neighbors if they are connected, ...

is_connected

Returns TRUE if the neighboring locations are connected to the given l...

knn_zones

Find the increasing subsets of kk nearest neighbors for all locations...

matrix_to_df

Convert a matrix to a data frame.

mc_pvalue

Calculate the Monte Carlo pp-value for a scan statistic.

permute_matrix

Permute the entries of the matrix, preserving row and column marginals...

powerset_zones

Creates a set of all non-empty subsets of the integers from 1 to nn.

print.scanstatistic

Print a scanstatistic object.

run_scan

Run a scan statistic analysis.

scan_bayes_negbin_cpp

Calculate the "Bayesian Spatial Scan Statistic" by Neill et al. (2006)...

scan_bayes_negbin

Calculate the negative binomial bayesian scan statistic..

scan_eb_negbin_cpp

Calculate the expectation-based negative binomial scan statistic.

scan_eb_negbin

Calculate the expectation-based negative binomial scan statistic.

scan_eb_poisson_cpp

Calculate the expecation-based Poisson scan statistic.

scan_eb_poisson

Calculate the expectation-based Poisson scan statistic.

scan_eb_zip_cpp

Calculate the highest-value EB ZIP loglihood ratio statistic.

scan_eb_zip

Calculate the expectation-based ZIP scan statistic.

scan_pb_perm_cpp

Calculate the space-time permutation scan statistic.

scan_pb_poisson_cpp

Calculate the population-based Poisson scan statistic.

scan_pb_poisson

Calculate the population-based Poisson scan statistic.

scan_permutation

Calculate the space-time permutation scan statistic.

scanstatistics-package

scanstatistics: Space-time anomaly detection using scan statistics.

score_locations

Score each location over zones and duration.

top_clusters

Get the top (non-overlappig) clusters.

Detection of anomalous space-time clusters using the scan statistics methodology. Focuses on prospective surveillance of data streams, scanning for clusters with ongoing anomalies. Hypothesis testing is made possible by Monte Carlo simulation. Allévius (2018) <doi:10.21105/joss.00515>.

  • Maintainer: Paul Romer Present
  • License: GPL (>= 3)
  • Last published: 2025-10-16