HH.count: Power calculation for count outcome based on analytic formula...

View source: R/SWSamp.R

HH.countR Documentation

Power calculation for count outcome based on analytic formula of Hussey and Hughes

Description

Sample size calculations for count outcomes based on the formula provided by Hussey and Hughes (2007)

Usage

HH.count(
  lambda1,
  RR,
  I,
  J,
  K,
  rho = 0,
  sig.level = 0.05,
  which.var = "within",
  X = NULL
)

Arguments

lambda1

Baseline value for the rate at which the outcome occurs

RR

Relative risk (of the intervention vs the control)

I

Number of clusters

J

Number of time points

K

Average size of each cluster

rho

Intra-class correlation coefficient (default=0)

sig.level

Significance level (default=0.05)

which.var

String character specifying which variance to be considered (options are the default value 'within' or 'total'

X

A design matrix for the stepped wedge design, indicating the time at which each of the clusters should switch the active intervention. By default is NULL and automatically computed, but can be passed as an extra argument as a user-defined matrix with I rows and (J+1) columns

Value

power

The resulting power

sigma.y

The estimated total (marginal) sd for the outcome

sigma.e

The estimated residual sd

sigma.a

The resulting cluster-level sd

setting

A list including the following values: - n.clusters = The number of clusters - n.time.points = The number of 'active' time points - avg.cluster.size = The average cluster size - design.matrix = The design matrix for the SWT under consideration

Author(s)

Gianluca Baio

References

Baio, G; Copas, A; Ambler, G; Hargreaves, J; Beard, E; and Omar, RZ Sample size calculation for a stepped wedge trial. Trials, 16:354. Aug 2015.

Hussey M and Hughes J. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials. 28(2):182-91. Epub 2006 Jul 7. Feb 2007

Examples


HH.count(lambda1=1.55,RR=.87,I=10,J=5,K=20,rho=.2)


giabaio/SWSamp documentation built on Nov. 14, 2022, 2:24 p.m.