- Home
- CRAN
**scanstatistics**: Space-Time Anomaly Detection using Scan Statistics**zip_calculations**: Calculate the (logarithm of the) ZIP statistic for each...

# Calculate the (logarithm of the) ZIP statistic for each space-time window.

### Description

Calculate the logarithm of the ZIP statistic for each space-time window, summing over the locations and times in the window.

### Usage

1 | ```
zip_calculations(table, zones, ...)
``` |

### Arguments

`table` |
A |

`zones` |
A |

`...` |
Arguments passed to |

### Value

A `data.table`

with columns `zone, duration, statistic`

.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

- 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...