sampSizeMCTGen: Sample Size Calculations (General Case)

Description Usage Arguments Value Examples

View source: R/sampSizeMCTGen.R

Description

This function build on the sampSizeMCT function in the DoseFinding package, allowing the procedure to work with the powMCTGen function for the general case.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
sampSizeMCTGen(
  family = c("negative binomial", "binomial", "poisson"),
  link = c("log", "logit", "probit", "cauchit", "cloglog", "log risk ratio",
    "risk ratio"),
  modelPar = NULL,
  theoResp = NULL,
  doses = NULL,
  upperN,
  lowerN = floor(upperN/2),
  Ntype = c("arm", "total"),
  alRatio = NULL,
  altModels,
  alpha = 0.025,
  power = 0.8,
  sumFct = c("min", "mean", "max"),
  verbose = FALSE,
  tol = 0.001
)

Arguments

family

A character string containing the error distribution to be used in the model.

link

A character string for the model link function.

modelPar

A numeric vector containing the additional parameters for the family argument. If the family is negative binomial, the dispersion parameter should be supplied. If the family is binomial, no model parameter should be supplied.

theoResp

A numerical vector of theoretical response values, on the transformed scale (e.g. on the log-scale for the negative binomial family). This should be the same length as the doses argument.

doses

A numerical vector of doses, corresponding to the theoretical response values provided.

upperN, lowerN

Upper and lower bound for the power sample size. lowerN defaults to floor(upperN/2).

Ntype

One of "arm", "total", or 'actual". See documentation for Ntype in powMCT for descriptions of "arm" and 'total". For "actual", the nSample should be a numerical vector containing the actual patient allocation for each dose provided.

alRatio

A numeric vector specifying the ratios between the patient allocation for the specified doses.

altModels

An object of class Mods, defining the mean vectors under which the power should be calculated.

alpha

A numeric value specifying the significance level

power

A numeric value specifying the power power of sumFct

sumFct

Either an included character vector or a function that combines the power values under the different alternative into one value.

verbose

A logical specifying whether the patient allocation should be printed, in addition to the results.

tol

A positive numeric value specifying the tolerance level for the bisection search algorithm. Bisection is stopped if the targFunc value is within tol of power.

Value

Numeric containing the calculated power values

Examples

1
2
3
4
5
6
7
8
9
dose.vec = c(0, 5, 10, 20, 30, 40)
models.full = Mods(doses = dose.vec, linear = NULL,
      sigEmax = rbind(c(9, 2), c(6, 3)),
      emax = 0.8,
      quadratic = -0.02,
      placEff = 0, maxEff = 2)
## Now we can calculate the sample sizes needed in order to achieve a certain power
sampSizeMCTGen("negative binomial", "log", modelPar = 0.1, upperN = 50, Ntype = "arm",
      altModels = models.full, alpha = 0.05, sumFct = "min", power = 0.8)

MCPModGeneral documentation built on March 26, 2020, 7:14 p.m.