scanstatistics: Space-Time Anomaly Detection using Scan Statistics

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 the generation of Monte Carlo p-values.

AuthorBenjamin Kjellson [aut, cre]
Date of publication2016-09-29 11:37:32
MaintainerBenjamin Kjellson <benjak@math.su.se>
LicenseGPL (>= 3)
Version0.1.0
https://github.com/BenjaK/scanstatistics

View on CRAN

Man pages

add_duration: Add a column 'duration' to a 'data.table' with column 'time'.

add_llr: Calculate the log-likelihood ratios from given...

calc_zipstat_over_duration: Calculate the ZIP window statistic over all durations, for a...

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

column_to_int: Replaces a column with integers, its unique and sorted values...

connected_neighbors: Find the connected sets for a location and its k nearest...

connected_to: Return those elements in the second set which are connected...

convolute_denominator: Computes the sum in the increasing score denominator.

convolute_numerator: Computes the sum in the increasing score numerator.

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

create_table: Create a 'data.table' with all combinations of the supplied...

cumsum_duration: Calculates the cumulative sum of columns over duration, by...

dist_to_knn: Given a distance matrix, find the k nearest neighbors.

enumerate_character: Enumerate the unique, sorted values of a column, returned as...

estimate_d: Estimate the indicators of excess zeros for a ZIP...

estimate_d_dagger: Estimate the ZIP excess zero indicators under null hypothesis...

estimate_zip_relrisk: Estimate the relative risk for an outbreak using a ZIP...

extract_mlc: Extract the most likely cluster (MLC) and the value of the...

extract_scanstatistic: Extract value of scan statistic from per-window statistics.

first_keys_match: Do the first few keys of the supplied table match the...

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

generate_poisson_counts: Randomly generate and add Poisson counts to a table.

generate_zip_counts: Randomly generate and add ZIP-distributed counts to a table.

gen_negbin_counts: Randomly generate and add negative binomial counts to a...

get_all_streams: Extract the sorted names of all data streams from a...

get_column_values: Extract the values of a 'data.table' column by the column...

get_enumerated_character: Get the name (as character) corresponding to the given...

getkeys: Get the keys from a data.table.

get_set: Get the set with the given index from an implicitly ordered...

get_zone: Extract a zone from the set of all zones.

has_converged: Is the relative error between two numbers is less than the...

haskeys: Determine if table has all the given keys.

if_connected: Return a set of the location and its neighbors if they are...

is_connected: Returns TRUE if the neighboring locations are connected to...

join_zones: Creates a new 'data.table' from a table containing locations,...

knn_zones: Find the increasing subsets of k nearest neighbors for all...

kulldorff_baseline: Estimate the _baselines_ (expected counts) by the Kulldorff...

mc_pvalue: Calculate the Monte Carlo p-value for a scan statistic.

negbin_calculations: Calculate the ordinary NegBin score for each space-time...

negbin_increasing_calculations: Calculate the increasing score for each space-time window.

negbin_increasing_score: Calculate the increasing score for each space-time window.

negbin_mcsim: Monte Carlo simulation of negative binomial score scan...

negbin_overdispersion: Computes the overdispersion parameter for a fitted negative...

negbin_score: Computes the ordinary score for each space-time window.

negbin_score_terms: Computes the numerator and denominator terms for the NegBin...

NM_geo: Longitude and latitude of New Mexico county seats.

NM_map: Data to plot the counties of New Mexico.

NM_popcas: Population and brain cancer cases in New Mexico counties...

partition_zones: Partition a set of zones.

poisson_calculations: Calculate the expectation-based Poisson statistic for each...

poisson_mcsim: Monte Carlo simulation of expectation-based Poisson scan...

poisson_relrisk: Add column for relative risk MLE to table with aggregate...

poisson_score_terms: Computes the numerator and denominator terms for the Poisson...

poisson_statistic: Calculate the expectation-based Poisson statistic for each...

powerset_zones: Creates a set of all non-empty subsets of the integers from 1...

print.scanstatistic: Print a scanstatistic object.

scan_negbin: Calculate the negative binomial scan statistic.

scan_poisson: Calculate the Poisson scan statistic.

scanstatistic_object: Creates an S3 object of class scanstatistic.

scanstatistics: scanstatistics: Space-time anomaly detection using scan...

scan_zip: Calculate the ZIP scan statistic.

score_locations: Score each location over zones and duration.

score_zone_sums: Sums the numerator and denominator terms over all locations...

sim_negbin_statistic: Simulate a single negative binomial score scan statistic.

simulate_poisson_scanstatistic: Simulate a single expectation-based Poisson scan statistic.

simulate_zip_scanstatistic: Simulate a single expectation-based ZIP-EM scan statistic.

times_and_durations: Creates a 'data.table' with columns 'time' and 'duration'.

top_clusters: Get the top (non-overlappig) clusters.

validate_colnames: Check that the input table has the right columns. Raises...

validate_scan: Check that input to scanstatistic function is valid.

validate_values: Check that the input table does not contain any missing...

validate_zones: Check that the zones argument is a list of integer or factor...

window_zip_statistic: Calculate the ZIP statistic for a single space-time window.

zip_calculations: Calculate the (logarithm of the) ZIP statistic for each...

zip_em_estimates: Estimates the ZIP relative risk and excess zero indicators...

zip_mcsim: Monte Carlo simulation of expectation-based Poisson scan...

zip_statistic: Calculates the ZIP statistic for each space-time window.

zip_statistic_factor: Factor(s) in the product of the EB-ZIP window statistic.

zip_statistic_term: Calculate a term in the sum of the logarithm of the ZIP...

zone_sum: Sum columns over all location in each zone, for each...

zone_table_creator: Converts a list of zones to a 'data.table' of zones and...

Files in this package

scanstatistics
scanstatistics/inst
scanstatistics/inst/doc
scanstatistics/inst/doc/introduction.R
scanstatistics/inst/doc/introduction.html
scanstatistics/inst/doc/introduction.Rmd
scanstatistics/tests
scanstatistics/tests/testthat.R
scanstatistics/tests/testthat
scanstatistics/tests/testthat/test_utility_functions.R
scanstatistics/tests/testthat/test_zone_utility_functions.R
scanstatistics/tests/testthat/test_scan_zip.R
scanstatistics/tests/testthat/test_zones.R
scanstatistics/tests/testthat/test_scan_negbin.R
scanstatistics/tests/testthat/test_baseline_estimation.R
scanstatistics/tests/testthat/test_scan_poisson.R
scanstatistics/tests/testthat/test_aggregation_functions.R
scanstatistics/NAMESPACE
scanstatistics/NEWS.md
scanstatistics/data
scanstatistics/data/NM_geo.rda
scanstatistics/data/NM_map.rda
scanstatistics/data/NM_popcas.rda
scanstatistics/R
scanstatistics/R/scan_negbin.R scanstatistics/R/baseline_estimation.R scanstatistics/R/aggregation_functions.R scanstatistics/R/scan_poisson.R scanstatistics/R/data.R scanstatistics/R/zones.R scanstatistics/R/scanstatistics.R scanstatistics/R/utility_functions.R scanstatistics/R/datatable_utility_functions.R scanstatistics/R/scanstatistics_general.R scanstatistics/R/scan_zip.R scanstatistics/R/zone_utility_functions.R
scanstatistics/vignettes
scanstatistics/vignettes/references.bib
scanstatistics/vignettes/introduction.Rmd
scanstatistics/README.md
scanstatistics/MD5
scanstatistics/build
scanstatistics/build/vignette.rds
scanstatistics/DESCRIPTION
scanstatistics/man
scanstatistics/man/scanstatistic_object.Rd scanstatistics/man/if_connected.Rd scanstatistics/man/negbin_calculations.Rd scanstatistics/man/validate_values.Rd scanstatistics/man/column_to_int.Rd scanstatistics/man/connected_neighbors.Rd scanstatistics/man/add_duration.Rd scanstatistics/man/coords_to_knn.Rd scanstatistics/man/simulate_zip_scanstatistic.Rd scanstatistics/man/score_zone_sums.Rd scanstatistics/man/convolute_denominator.Rd scanstatistics/man/extract_mlc.Rd scanstatistics/man/scanstatistics.Rd scanstatistics/man/validate_zones.Rd scanstatistics/man/scan_poisson.Rd scanstatistics/man/closest_subsets.Rd scanstatistics/man/poisson_statistic.Rd scanstatistics/man/window_zip_statistic.Rd scanstatistics/man/negbin_overdispersion.Rd scanstatistics/man/times_and_durations.Rd scanstatistics/man/validate_scan.Rd scanstatistics/man/top_clusters.Rd scanstatistics/man/is_connected.Rd scanstatistics/man/negbin_score.Rd scanstatistics/man/zip_mcsim.Rd scanstatistics/man/create_table.Rd scanstatistics/man/scan_zip.Rd scanstatistics/man/get_all_streams.Rd scanstatistics/man/zip_statistic_term.Rd scanstatistics/man/haskeys.Rd scanstatistics/man/convolute_numerator.Rd scanstatistics/man/NM_popcas.Rd scanstatistics/man/calc_zipstat_over_duration.Rd scanstatistics/man/poisson_relrisk.Rd scanstatistics/man/negbin_increasing_score.Rd scanstatistics/man/poisson_score_terms.Rd scanstatistics/man/partition_zones.Rd scanstatistics/man/connected_to.Rd scanstatistics/man/first_keys_match.Rd scanstatistics/man/kulldorff_baseline.Rd scanstatistics/man/has_converged.Rd scanstatistics/man/negbin_mcsim.Rd scanstatistics/man/negbin_increasing_calculations.Rd scanstatistics/man/score_locations.Rd scanstatistics/man/zip_em_estimates.Rd scanstatistics/man/negbin_score_terms.Rd scanstatistics/man/extract_scanstatistic.Rd scanstatistics/man/zip_statistic.Rd scanstatistics/man/zone_sum.Rd scanstatistics/man/powerset_zones.Rd scanstatistics/man/NM_map.Rd scanstatistics/man/knn_zones.Rd scanstatistics/man/getkeys.Rd scanstatistics/man/cumsum_duration.Rd scanstatistics/man/get_zone.Rd scanstatistics/man/poisson_calculations.Rd scanstatistics/man/scan_negbin.Rd scanstatistics/man/generate_poisson_counts.Rd scanstatistics/man/mc_pvalue.Rd scanstatistics/man/simulate_poisson_scanstatistic.Rd scanstatistics/man/join_zones.Rd scanstatistics/man/dist_to_knn.Rd scanstatistics/man/enumerate_character.Rd scanstatistics/man/zip_statistic_factor.Rd scanstatistics/man/get_enumerated_character.Rd scanstatistics/man/NM_geo.Rd scanstatistics/man/estimate_zip_relrisk.Rd scanstatistics/man/zip_calculations.Rd scanstatistics/man/add_llr.Rd scanstatistics/man/estimate_d.Rd scanstatistics/man/sim_negbin_statistic.Rd scanstatistics/man/get_column_values.Rd scanstatistics/man/poisson_mcsim.Rd scanstatistics/man/estimate_d_dagger.Rd scanstatistics/man/flexible_zones.Rd scanstatistics/man/get_set.Rd scanstatistics/man/zone_table_creator.Rd scanstatistics/man/print.scanstatistic.Rd scanstatistics/man/gen_negbin_counts.Rd scanstatistics/man/generate_zip_counts.Rd scanstatistics/man/validate_colnames.Rd

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.