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

n_fix.ChiSquare

Fixed Sample Size


Description

Returns the sample size of a fixed design without sample size recalculation.

Usage

## S4 method for signature 'ChiSquare'
n_fix(
  design,
  nuisance,
  variance = c("heterogeneous", "homogeneous"),
  rounded = TRUE,
  ...
)

Arguments

design

Object of class ChiSquare created by setupChiSquare.

nuisance

Value of the nuisance parameter. For the Chi-Squared test this is the overall response rate.

variance

A character string indicating whether the "heterogenous" (default) or the "homogeneous" variance formula should be used.

rounded

Whether the calculated sample size should be rounded up such that the allocation ratio is preserved.

...

Further optional arguments.

Details

The method is only vectorized in either nuisance or n1.

Value

One value of the fixed sample size for every nuisance parameter and every value of n1.

Examples

design1 <- setupChiSquare(alpha = 0.025, beta = 0.2, r = 1, delta = 0.2)
  n_fix(design1, nuisance = c(0.2, 0.3))

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.