Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ChiSquare

Chi-squared test


Description

This class implements a chi-squared test for superiority trials. A trial with binary outcomes in two groups T and C is assumed.

The function setupChiSquare creates an object of class ChiSquare.

Usage

setupChiSquare(
  alpha,
  beta,
  r = 1,
  delta,
  alternative = c("greater", "smaller"),
  n_max = Inf,
  ...
)

Arguments

alpha

One-sided type I error rate.

beta

Type II error rate.

r

Allocation ratio between experimental and control group.

delta

Difference of effect size between alternative and null hypothesis.

alternative

Does the alternative hypothesis contain greater (greater) or smaller (smaller) values than the null hypothesis.

n_max

Maximal overall sample size. If the recalculated sample size is greater than n_max it is set to n_max.

...

Further optional arguments.

Details

The following methods are available for this class: toer, pow, n_dist, adjusted_alpha, and n_fix. Check the design specific documentation for details.

For non-inferiority trials use the function setupFarringtonManning.

Value

An object of class ChiSquare.

Examples

design <- setupChiSquare(alpha = .025, beta = .2, r = 1, delta = 0.2,
alternative = "greater")

blindrecalc

Blinded Sample Size Recalculation

v0.1.2
MIT + file LICENSE
Authors
Lukas Baumann [aut], Maximilian Pilz [aut, cre], Institute of Medical Biometry and Informatics - University of Heidelberg [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.