smerc (version 1.8.3)

summary.smerc_cluster: Summary of smerc_cluster object

Description

Summary of object of class smerc_cluster.

Usage

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

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.

Arguments

object

An object of class smerc_cluster.

...

Arguments passed on to base::summary

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.

Examples

Run this code
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))

Run the code above in your browser using DataLab