https://github.com/openpharma/dosefinding
https://github.com/openpharma/dosefinding
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/openpharma/dosefinding
- Owner: openpharma
- Created: 2024-07-29T11:15:18.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-12-15T07:11:07.000Z (6 months ago)
- Last Synced: 2024-12-15T08:18:08.756Z (6 months ago)
- Language: R
- Homepage: https://openpharma.github.io/DoseFinding/
- Size: 6.75 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# DoseFinding
[](https://CRAN.R-project.org/package=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](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("bbnkmp/DoseFinding")
```## Examples
### Performing multiple contrast tests
```{r example1, warning = FALSE, message=FALSE}
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)
```### Fitting non-linear dose-response model
```{r example2}
## 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
```{r example3}
## 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")
```