getSizeOrd {GenTwoArmsTrialSize}R Documentation

General Formulas for Sample Size Calculation

Description

This function computes the sample size required for two arms clinical trials with ordinal outcome measure. Four hypothesis tests are available under two allocation designs.

Usage

getSizeOrd(
  design = c("parallel", "crossover"),
  test = c("equality", "noninferiority", "superiority", "equivalence"),
  alpha = 0.05,
  beta = 0.2,
  varcatprob,
  k = 1,
  theta,
  delta = 0,
  rho = c(0.05, 0.07),
  r = 0.1
)

Arguments

design

allocation method (parallel or crossover).

test

four hypothesis tests: equality, noninferiority, superiority, and equivalence.

alpha

level of significance.

beta

type II error.

varcatprob

list of two probability vectors per treatment arm

k

ratio of control to treatment.

theta

log odds ratio of outcome in treatment arm versus control arm

delta

delta margin in test hypothesis.

rho

vector of length 2, positive noncompliance rates of two arms.

r

projected proportion of trial uniform loss of follow-up.

Value

sample size per arm.

Examples

# Ex 1. (n_trt=135, n_ctl=135)
getSizeOrd(design="parallel", test="equality", alpha=0.05, beta=0.10,
 varcatprob = list(c(0.2,0.5,0.2,0.1), c(0.378,0.472,0.106,0.044)),
 k=1, theta=0.887, delta=0, rho=c(0.05, 0.07), r=0.1)

# Ex 2. (Check back next version)
getSizeOrd(design="crossover", test="equality", alpha=0.05, beta=0.10,
 varcatprob = list(c(0.2,0.5,0.2,0.1), c(0.378,0.472,0.106,0.044)),
 k=1, theta=0.887, delta=0, rho=c(0.05, 0.07), r=0.1)


[Package GenTwoArmsTrialSize version 0.0.5 Index]