summary.smerc_cluster: Summary of 'smerc_cluster' object

View source: R/smerc_cluster-summary.R

summary.smerc_clusterR Documentation

Summary of smerc_cluster object

Description

Summary of object of class smerc_cluster.

Usage

## S3 method for class 'smerc_cluster'
summary(object, ..., idx = seq_along(object$clusters), digits = 1)

Arguments

object

An object of class smerc_cluster.

...

Additional arguments affecting the summary produced.

idx

An index vector indicating the elements of object$clusters to print information for. The default is all clusters.

digits

Integer indicating the number of decimal places.

Value

A data.frame with columns:

nregions

The number of regions in the cluster.

max_dist

The maximum intercentroid distance between all the regions in the cluster.

cases

The number of cases in the cluster.

ex

The expected number of cases in the cluster.

rr

Relative risk in the cluster window. This is (cases/pop)/((total_cases - cases)/ (total_population - population)).

stat

The test statistic for the cluster.

p

The p-value of the test statistic associated with the cluster.

Examples

data(nydf)
coords <- with(nydf, cbind(x, y))
out <- scan.test(
  coords = coords, cases = floor(nydf$cases),
  pop = nydf$pop, nsim = 49,
  longlat = TRUE, alpha = 0.2
)
# summarize all clusters
summary(out)
# summarize clusters 1 and 3
summary(out, idx = c(1, 3))

jfrench/smerc documentation built on Oct. 27, 2024, 5:13 p.m.