CRTpower {CRTspat}R Documentation

Power and sample size calculations for a CRT

Description

CRTpower carries out power and sample size calculations for CRTs.

Usage

CRTpower(
  trial = NULL,
  locations = NULL,
  alpha = 0.05,
  desiredPower = 0.8,
  effect = NULL,
  yC = NULL,
  outcome_type = "d",
  sigma2 = NULL,
  denominator = 1,
  N = 1,
  ICC = NULL,
  cv_percent = NULL,
  c = NULL,
  sd_h = 0
)

Arguments

trial

dataframe or 'CRTsp' object: optional list of locations

locations

numeric: total number of units available for randomization (required if trial is not specified)

alpha

numeric: confidence level

desiredPower

numeric: desired power

effect

numeric: required effect size

yC

numeric: baseline (control) value of outcome

outcome_type

character: with options - 'y': continuous; 'n': count; 'e': event rate; 'p': proportion; 'd': dichotomous.

sigma2

numeric: variance of the outcome (required for outcome_type = 'y')

denominator

numeric: rate multiplier (for outcome_type = 'n' or outcome_type = 'e')

N

numeric: mean of the denominator for proportions (for outcome_type = 'p')

ICC

numeric: Intra-cluster correlation

cv_percent

numeric: Coefficient of variation of the outcome (expressed as a percentage)

c

integer: number of clusters in each arm (required if trial is not specified)

sd_h

standard deviation of number of units per cluster (required if trial is not specified)

Details

Power and sample size calculations are for an unmatched two-arm trial. For counts or event rate data the formula of Hayes & Bennett, 1999 is used. This requires as an input the between cluster coefficient of variation (cv_percent). For continuous outcomes and proportions the formulae of Hemming et al, 2011 are used. These make use of the intra-cluster correlation in the outcome (ICC) as an input. If the coefficient of variation and not the ICC is supplied then the intra-cluster correlation is computed from the coefficient of variation using the formulae from Hayes & Moulton. If incompatible values for ICC and cv_percent are supplied then the value of the ICC is used.

The calculations do not consider any loss in power due to spillover, loss to follow-up etc..

If geolocations are not input then power and sample size calculations are based on the scalar input parameters.

If a trial dataframe or 'CRTsp' object is input then this is used to determine the number of locations. If this input object contains cluster assignments then the numbers and sizes of clusters in the input data are used to estimate the power. If buffer zones have been specified then separate calculations are made for the core area and for the full site.

The output is an object of class 'CRTsp' containing any input trial dataframe and values for:

Value

A list of class 'CRTsp' object comprising the input data, cluster and arm assignments, trial description and results of power calculations

Examples

{# Power calculations for a binary outcome without input geolocations
examplePower1 = CRTpower(locations = 3000, ICC = 0.10, effect = 0.4, alpha = 0.05,
    outcome_type = 'd', desiredPower = 0.8, yC=0.35, c = 20, sd_h = 5)
summary(examplePower1)
# Power calculations for a rate outcome without input geolocations
examplePower2 = CRTpower(locations = 2000, cv_percent = 40, effect = 0.4, denominator = 2.5,
    alpha = 0.05, outcome_type = 'e', desiredPower = 0.8, yC = 0.35, c = 20, sd_h=5)
summary(examplePower2)
# Example with input geolocations and randomisation
examplePower3 = CRTpower(trial = readdata('example_site.csv'), desiredPower = 0.8,
    effect=0.4, yC=0.35, outcome_type = 'd', ICC = 0.05, c = 20)
summary(examplePower3)
}

[Package CRTspat version 1.2.0 Index]