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

sampSizeCore

Function for sample size calculation


Description

Function for sample size calculation

Usage

sampSizeCore(upperN, lowerN = floor(upperN/2), targFunc, target,
  tol = 0.001, alRatio, Ntype = c("arm", "total"), verbose = FALSE, ...)

Arguments

upperN

targFunc(upperN) should be bigger than target (otherwise upperN is doubled until this is the case).

lowerN

targFunc(lowerN) should be smaller than target (otherwise lowerN is halfed until this is the case).

targFunc

The target (power) function that should be monotonically increasing in n.

target

The target value. The function searches the n with targFunc(n)-target<tol and targFunc(n)>target.

tol

Tolerance: The function searches the n with targFunc(n)-target<tol and targFunc(n)>target.

alRatio

Allocation ratio.

Ntype

Either "arm" or "total".

verbose

Logical, whether verbose output should be printed.

...

...

Details

For details see the manual and examples.

Value

Integer value n (of type numeric) with targFunc(n)-target<tol and targFunc(n)>target.

Author(s)

This function is taken from package DoseFinding under GPL from Bjoern Bornkamp, Jose Pinheiro and Frank Bretz

Examples

f <- function(x){1/100*log(x)}
gMCP:::sampSizeCore(upperN=1000, targFunc=f, target=0.008, verbose=TRUE, alRatio=1)

gMCP

Graph Based Multiple Comparison Procedures

v0.8-15
GPL (>= 2)
Authors
Kornelius Rohmeyer [aut, cre], Florian Klinglmueller [aut]
Initial release

We don't support your browser anymore

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