geen: Generalized estimating equation number of clusters (N)...

View source: R/GEE_Functions.R

geenR Documentation

Generalized estimating equation number of clusters (N) required for testing a main effect of treatment

Description

Compute the sample size (N, number of clusters) required to test a main effect of a treatment in a 2-arm parallel groups design via a 3-level generalized estimating equation with binary outcome data.

Usage

geen(p0, p1, r, rho, n_e = 1, n_s = 1, pi_c = 0.5, alpha = 0.05, gamma = 0.2)

Arguments

p0

A numeric value for p_0: the probability of the outcome in the control arm.

p1

A numeric value for p_1: the probability of the outcome in the treatment arm.

r

A numeric value for r: the correlation between evaluations from the same subject.

rho

A numeric value for \rho: the correlation between outcome evaluations from different subjects in the same cluster.

n_e

A numeric value for n_e: the number of outcome evaluations per subject (level 1 observations of the binary outcome variable), which is assumed to be constant across subjects.

n_s

A numeric value for n_s: the number of subjects (level 2 units) per cluster (i.e., the cluster size), which is assumed to be constant across clusters.

pi_c

A numeric value for \pi: the proportion of clusters in the control arm.

alpha

A numeric value for \alpha: the Type I error rate.

gamma

A numeric value for \gamma: the Type II error rate.

Details

=============================================================================

This function uses a z-score approximation instead of a t-statistic to avoid iteratively solving the sample size formula. The resulting N is then then translated into power using the t-statistic and degrees of freedom implied by the resulting sample size.

Value

A data frame.

References

Teerenstra, S., Lu, B., Preisser, J. S., van Achterberg, T., & Borm, G. F. (2010). Sample size considerations for GEE analyses of three-level cluster randomized trials. Biometrics, 66(4), 1230-1237. doi:10.1111/j.1541-0420.2009.01374.x


sjpierce/piercer documentation built on Dec. 30, 2024, 3:28 p.m.