R: Calculate dose estimates for a fitted dose-response model...
Target Doses
R Documentation
Calculate dose estimates for a fitted dose-response model (via
fitMod or bFitMod) or a Mods
object.
Description
The TD (target dose) is defined as the dose that achieves a target
effect of Delta over placebo (if there are multiple such doses, the
smallest is chosen):
TD = min {x|f(x) > f(0)+Delta}
If a decreasing trend is beneficial the definition of the TD is
TD = min {x|f(x) < f(0)-Delta}
When Delta is the clinical relevance threshold, then the
TD is similar to the usual definition of the minimum effective dose (MED).
The ED (effective dose) is defined as the dose that achieves a certain
percentage p of the full effect size (within the observed dose-range!)
over placebo (if there are multiple such doses, the smallest is
chosen).
EDp=min
{x|f(x) > f(0) + p(f(dmax)-f(0))}
Note that this definition of the EDp is different from traditional
definition based on the Emax model, where the EDp is defined relative
to the asymptotic maximum effect (rather than the maximum
effect in the observed dose-range).
An object of class c(Mods, fullMod), DRMod or bFitMod
Delta, p
Delta: The target effect size use for the target dose (TD) (Delta should be
> 0).
p: The percentage of the dose to use for the effective dose.
TDtype, EDtype
character that determines, whether the dose should be treated as a
continuous variable when calculating the TD/ED or whether the TD/ED
should be calculated based on a grid of doses specified in
doses
direction
Direction to be used in defining the TD. This depends on whether an
increasing or decreasing of the response variable is beneficial.
doses
Dose levels to be used, this needs to include placebo, TDtype
or EDtype are equal to "discrete".
Value
Returns the dose estimate
Author(s)
Bjoern Bornkamp
See Also
Mods, fitMod, bFitMod, drmodels
Examples
## example for creating a "full-model" candidate set placebo response
## and maxEff already fixed in Mods call
doses <- c(0, 10, 25, 50, 100, 150)
fmodels <- Mods(linear = NULL, emax = 25,
logistic = c(50, 10.88111), exponential = 85,
betaMod = rbind(c(0.33, 2.31), c(1.39, 1.39)),
linInt = rbind(c(0, 1, 1, 1, 1),
c(0, 0, 1, 1, 0.8)),
doses=doses, placEff = 0, maxEff = 0.4,
addArgs=list(scal=200))
## calculate doses giving an improvement of 0.3 over placebo
TD(fmodels, Delta=0.3)
## discrete version
TD(fmodels, Delta=0.3, TDtype = "discrete", doses=doses)
## doses giving 50% of the maximum effect
ED(fmodels, p=0.5)
ED(fmodels, p=0.5, EDtype = "discrete", doses=doses)
plot(fmodels, plotTD = TRUE, Delta = 0.3)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DoseFinding)
Loading required package: lattice
Loading required package: mvtnorm
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DoseFinding/targdose.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Target Doses
> ### Title: Calculate dose estimates for a fitted dose-response model (via
> ### 'fitMod' or 'bFitMod') or a 'Mods' object.
> ### Aliases: TD ED
>
> ### ** Examples
>
> ## example for creating a "full-model" candidate set placebo response
> ## and maxEff already fixed in Mods call
> doses <- c(0, 10, 25, 50, 100, 150)
> fmodels <- Mods(linear = NULL, emax = 25,
+ logistic = c(50, 10.88111), exponential = 85,
+ betaMod = rbind(c(0.33, 2.31), c(1.39, 1.39)),
+ linInt = rbind(c(0, 1, 1, 1, 1),
+ c(0, 0, 1, 1, 0.8)),
+ doses=doses, placEff = 0, maxEff = 0.4,
+ addArgs=list(scal=200))
>
> ## calculate doses giving an improvement of 0.3 over placebo
> TD(fmodels, Delta=0.3)
linear emax logistic exponential betaMod1 betaMod2
112.500000 45.000000 62.095220 130.265330 4.880978 56.762044
linInt1 linInt2
21.250000 43.750000
> ## discrete version
> TD(fmodels, Delta=0.3, TDtype = "discrete", doses=doses)
linear emax logistic exponential betaMod1 betaMod2
150 50 100 150 10 100
linInt1 linInt2
25 50
> ## doses giving 50% of the maximum effect
> ED(fmodels, p=0.5)
linear emax logistic exponential betaMod1 betaMod2
75.000000 18.750000 50.215409 104.517639 1.255838 37.337384
linInt1 linInt2
NA NA
> ED(fmodels, p=0.5, EDtype = "discrete", doses=doses)
linear emax logistic exponential betaMod1 betaMod2
100 25 100 150 10 50
linInt1 linInt2
25 50
>
> plot(fmodels, plotTD = TRUE, Delta = 0.3)
>
>
>
>
>
> dev.off()
null device
1
>