getDesignOrderedBinom: Power and Sample Size for Cochran-Armitage Trend Test for...

View source: R/getDesignProportions.R

getDesignOrderedBinomR Documentation

Power and Sample Size for Cochran-Armitage Trend Test for Ordered Multi-Sample Binomial Response

Description

Obtains the power given sample size or obtains the sample size given power for the Cochran-Armitage trend test for ordered multi-sample binomial response.

Usage

getDesignOrderedBinom(
  beta = NA_real_,
  n = NA_real_,
  ngroups = NA_integer_,
  pi = NA_real_,
  w = NA_real_,
  allocationRatioPlanned = NA_integer_,
  rounding = TRUE,
  alpha = 0.05
)

Arguments

beta

The type II error.

n

The total sample size.

ngroups

The number of treatment groups.

pi

The response probabilities for the treatment groups.

w

The scores assigned to the treatment groups. This should reflect the ordinal nature of the treatment groups, e.g. dose levels. Defaults to equally spaced scores.

allocationRatioPlanned

Allocation ratio for the treatment groups.

rounding

Whether to round up sample size. Defaults to 1 for sample size rounding.

alpha

The two-sided significance level. Defaults to 0.05.

Value

An S3 class designOrderedBinom object with the following components:

  • power: The power to reject the null hypothesis.

  • alpha: The two-sided significance level.

  • n: The maximum number of subjects.

  • ngroups: The number of treatment groups.

  • pi: The response probabilities for the treatment groups.

  • w: The scores assigned to the treatment groups.

  • trendstat: The Cochran-Armitage trend test statistic.

  • allocationRatioPlanned: Allocation ratio for the treatment groups.

  • rounding: Whether to round up sample size.

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


(design1 <- getDesignOrderedBinom(
  beta = 0.1, ngroups = 3, pi = c(0.1, 0.25, 0.5), alpha = 0.05))


lrstat documentation built on Oct. 18, 2024, 9:06 a.m.