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

Student

Student's t test


Description

This class implements Student's t-test for superiority and non-inferiority tests. A trial with continuous outcomes of the two groups T and C is assumed. If alternative == "greater" the null hypothesis for the mean difference Δ = μT - μC is

H0: Δ ≤ -δNI vs. H1: Δ > -δNI.

NI
NI
alternative=="smaller"

The function setupStudent creates an object of class Student that can be used for sample size recalculation.

Usage

setupStudent(
  alpha,
  beta,
  r = 1,
  delta,
  delta_NI = 0,
  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.

delta_NI

Non-inferiority margin.

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 notation is based on the paper of Lu (2019): Distribution of the two-sample t-test statistic following blinded sample size re-estimation. Pharmaceutical Statistics 15: 208-215.

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

Value

An object of class Student.

Examples

d <- setupStudent(alpha = .025, beta = .2, r = 1, delta = 3.5, delta_NI = 0,
                   alternative = "greater", n_max = 156)

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.