cpower: Compute power of test

View source: R/power.R

cpowerR Documentation

Compute power of test

Description

Compute the empirical power of a method from the null test statistics, the results from the observed data, and the true hotspot locations. The power is simply the proportion of observed data sets for which a significant result was detected.

Usage

cpower(tnull, tdata, hotspot, alpha = c(0.05, 0.01))

Arguments

tnull

The set of null test statistics

tdata

The list of maximum test statistics (tmax) and most likely cluster (mlc) for each simulated data set.

hotspot

A vector containing the hotspot indices for the current data set.

alpha

The type I error rate. Default is c(0.05, 0.01).

Value

A vector of power calculations.

Examples

tnull = 1:99
tdata = list(list(tmax = 96, mlc = c(50, 51)),
             list(tmax = 101, mlc = c(48, 57)))
cpower(tnull, tdata, 50)

jpfrench81/neastbenchmark documentation built on July 26, 2023, 3:07 p.m.