Skip to contents

Creates a model that assumes events are equally likely across all regions. This serves as a "null hypothesis" baseline - regions where events cluster will show high surprise under this model.

Usage

bs_model_uniform(n_regions = NULL)

Arguments

n_regions

Number of regions (optional, inferred from data if NULL)

Value

A bs_model_uniform object

Details

Under the uniform model, expected probability for each region is 1/n, where n is the total number of regions. The likelihood is computed as:

$$P(D|Uniform) = 1 - \frac{1}{2} \sum_i |O_i - \frac{1}{n}|$$

This is the Total Variation Distance from uniform, transformed to a probability.

The uniform model is useful for detecting spatial clustering - any concentration of events in fewer regions will produce high surprise.

Examples

# Create uniform model
model <- bs_model_uniform()

# The model computes likelihood when used in a model space
space <- model_space(model)