sparrpowR-package: The sparrpowR Package: Power Analysis to Detect Spatial...

sparrpowR-packageR Documentation

The sparrpowR Package: Power Analysis to Detect Spatial Relative Risk Clusters

Description

Computes the statistical power for the spatial relative risk function.

Details

For a two-group comparison (e.g., cases v. controls) the 'sparrpowR' package calculates the statistical power to detect clusters using the kernel-based spatial relative risk function that is estimated using the 'sparr' package. Details about the 'sparr' package methods can be found in the tutorial: Davies et al. (2018) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.7577")}. Details about kernel density estimation can be found in J. F. Bithell (1990) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.4780090616")}. More information about relative risk functions using kernel density estimation can be found in J. F. Bithell (1991) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.4780101112")}.

This package provides a function to compute the statistical power for the spatial relative risk function with various theoretical spatial sampling strategies. The 'sparrpowR' package also provides a function to compute the statistical power for the spatial relative risk function for scenarios where one group (e.g., cases) have been observed and a theoretical sampling strategy for the second group (e.g., controls) is desired. The 'sparrpowR' package also provides visualization of data and statistical power.

Key content of the 'sparrpowR' package include:

Theoretical Spatial Sampling

spatial_data Generates random two-group data for a spatial relative risk function.

Statistical Power

spatial_power Computes the statistical power of a spatial relative risk function using randomly generated data.

jitter_power Computes the statistical power of a spatial relative risk function using previously collected data.

Data Visualization

spatial_plots Visualizes multiple plots of output from spatial_data, spatial_power and jitter_power functions.

Dependencies

The 'sparrpowR' package relies heavily upon sparr-package, spatstat.random-package, spatstat.geom-package, and terra-package for computing the statistical power and visualizing the output. Computation can be performed in parallel using doFuture-package, multisession, doRNG-package, and foreach-package functions. Basic visualizations rely on the plot.ppp and image.plot functions.

Author(s)

Ian D. Buller
DLH, LLC (formerly known as Social & Scientific Systems, Inc.) Bethesda, Maryland, USA (current); Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland, USA (original)

Maintainer: I.D.B. ian.buller@alumni.emory.edu.gov

See Also

Useful links:


sparrpowR documentation built on Aug. 29, 2025, 5:35 p.m.