Learn R Programming

DoseFinding

The DoseFinding package provides functions for the design and analysis of dose-finding experiments (for example pharmaceutical Phase II clinical trials). It provides functions for: multiple contrast tests, fitting non-linear dose-response models, a combination of testing and dose-response modelling and calculating optimal designs, both for normal and general response variable.

Installation

You can install the development version of DoseFinding from GitHub with:

# install.packages("devtools")
devtools::install_github("bbnkmp/DoseFinding")

Examples

Performing multiple contrast tests

library(DoseFinding)
data(IBScovars)

## set random seed to ensure reproducible adj. p-values for multiple contrast test
set.seed(12)

## perform (model based) multiple contrast test
## define candidate dose-response shapes
models <- Mods(linear = NULL, emax = 0.2, quadratic = -0.17,
               doses = c(0, 1, 2, 3, 4))
## plot models
plot(models)
## perform multiple contrast test
MCTtest(dose, resp, IBScovars, models=models,
                addCovars = ~ gender)
#> Multiple Contrast Test
#> 
#> Contrasts:
#>   linear   emax quadratic
#> 0 -0.616 -0.889    -0.815
#> 1 -0.338  0.135    -0.140
#> 2  0.002  0.226     0.294
#> 3  0.315  0.252     0.407
#> 4  0.638  0.276     0.254
#> 
#> Contrast Correlation:
#>           linear  emax quadratic
#> linear     1.000 0.768     0.843
#> emax       0.768 1.000     0.948
#> quadratic  0.843 0.948     1.000
#> 
#> Multiple Contrast Test:
#>           t-Stat   adj-p
#> emax       3.208 0.00128
#> quadratic  3.083 0.00228
#> linear     2.640 0.00848

Fitting non-linear dose-response model

## fit non-linear emax dose-response model
fitemax <- fitMod(dose, resp, data=IBScovars, model="emax",
                  bnds = c(0.01,5))
## display fitted dose-effect curve
plot(fitemax, CI=TRUE, plotData="meansCI")

Optimal designs for dose estimation

## Calculate optimal designs for target dose (TD) estimation
doses <- c(0, 10, 25, 50, 100, 150)
fmodels <- Mods(linear = NULL, emax = 25, exponential = 85,
                logistic = c(50, 10.8811),
                doses = doses, placEff=0, maxEff=0.4)
plot(fmodels, plotTD = TRUE, Delta = 0.2)
weights <- rep(1/4, 4)
optDesign(fmodels, weights, Delta=0.2, designCrit="TD")
#> Calculated TD - optimal design:
#>       0      10      25      50     100     150 
#> 0.34960 0.09252 0.00366 0.26760 0.13342 0.15319

Copy Link

Version

Install

install.packages('DoseFinding')

Monthly Downloads

1,838

Version

1.4-1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marius Thomas

Last Published

July 9th, 2025

Functions in DoseFinding (1.4-1)

mvpostmix

Prior to posterior updating for a multivariate normal mixture
mvtnorm-control

Control options for pmvt and qmvt functions
critVal

Calculate critical value for multiple contrast test
glycobrom

Glycopyrronium Bromide dose-response data
maFitMod

Fit dose-response models via bootstrap model averaging (bagging)
defBnds

Calculates default bounds for non-linear parameters in dose-response models
fitMod

Fit non-linear dose-response model
drmodels

Built-in dose-response models in DoseFinding
migraine

Migraine Dose Response data
guesst

Calculate guesstimates based on prior knowledge
optDesign

Function to calculate optimal designs
powMCTInterim

Calculate Conditional or Predictive Power for Multiple Contrast Test
optContr

Calculate optimal contrasts
Target doses

Calculate dose estimates for a fitted dose-response model (via fitMod(), bFitMod()) or maFitMod()) or a Mods() object
sampSize

Sample size calculations
neurodeg

Neurodegenerative disease simulated longitudinal dose-finding data set
powMCT

Calculate power for multiple contrast test
planMod

Evaluate performance metrics for fitting dose-response models
DesignMCPModApp

Start externally hosted DesignMCPMod Shiny App
IBScovars

Irritable Bowel Syndrome Dose Response data with covariates
MCPMod

MCPMod - Multiple Comparisons and Modeling
Mods

Define dose-response models
MCTpval

Calculate multiplicity adjusted p-values for multiple contrast test
MCTtest

Performs multiple contrast test
bMCTtest

Performs Bayesian multiple contrast test
bFitMod

Fit a dose-response model using Bayesian or bootstrap methods.
biom

Biometrics Dose Response data
DoseFinding-package

DoseFinding: Planning and Analyzing Dose Finding Experiments