power_nb: Calculate sample size or power for comparing 2 negative...

power_nbR Documentation

Calculate sample size or power for comparing 2 negative binomial rates (either n or power needs to included)

Description

Calculate sample size or power for comparing 2 negative binomial rates (either n or power needs to included)

Usage

power_nb(
  n = NULL,
  r0,
  r1,
  RR,
  k,
  duration = 1,
  ssize.ratio = 1,
  alpha = 0.025,
  power = NULL,
  approach = 3
)

Arguments

n

Sample Size; Leave NULL to calculate power

r0

Event Rate (Placebo)

r1

Event Rate (Treatment); Alernatively, enter RR

RR

Rate Ratio

k

Negative binomial dispersion parameter (see dispersion_nb Function)

duration

Average treatment duration

ssize.ratio

Sample allocation ratio n1/n0 (Default is 1)

alpha

1-sided alpha (Type I error)

approach

1 (Use reference group rate), 2 (Use true rates), or 3 (Use ML estimation); see Zhu and Lakkis (2014).

beta

Type II error; Leave NULL to calculate sample size

Value

Either power of Number of events reported


th-zelniker/TIMI documentation built on Oct. 1, 2022, 2 p.m.