Package 'TestingSimilarity'

Title: Bootstrap Test for the Similarity of Dose Response Curves Concerning the Maximum Absolute Deviation
Description: Provides a bootstrap test which decides whether two dose response curves can be assumed as equal concerning their maximum absolute deviation. A plenty of choices for the model types are available, which can be found in the 'DoseFinding' package, which is used for the fitting of the models. See <doi:10.1080/01621459.2017.1281813> for details.
Authors: Kathrin Moellenhoff
Maintainer: Kathrin Moellenhoff <[email protected]>
License: GPL-3
Version: 1.1
Built: 2025-02-09 03:29:04 UTC
Source: https://github.com/cran/TestingSimilarity

Help Index


Implementation of Beta models

Description

Beta model:

m(d,β)=E0+EmaxB(δ1,δ2)(d/scal)δ1(1d/scal)δ2m(d,\beta)=E_0+E_{max}B(\delta_1,\delta_2)(d/scal)^{\delta_1}(1-d/scal)^{\delta_2}

with

B(δ1,δ2)=(δ1+δ2)δ1+δ2/(δ1δ1δ2δ2)B(\delta_1,\delta_2)=(\delta_1+\delta_2)^{\delta_1+\delta_2}/(\delta_1^{\delta_1} \delta_2^{\delta_2})

and scalscal is a fixed dose scaling parameter.

Usage

betaMod(d, e, scal)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

scal

fixed dose scaling parameter

Value

Response value.


Bootstrap test for the equivalence of dose response curves via the maximum absolute deviation

Description

Function for testing whether two dose response curves can be assumed as equal concerning the hypotheses

H0:maxdDm1(d,β1)m2(d,β2)ϵ vs. H1:maxdDm1(d,β1)m2(d,β2)<ϵ,H_0: \max_{d\in\mathcal{D}} |m_1(d,\beta_1)-m_2(d,\beta_2)|\geq \epsilon\ vs.\ H_1: \max_{d\in\mathcal{D}} |m_1(d,\beta_1)-m_2(d,\beta_2)|< \epsilon,

where

D\mathcal{D}

denotes the dose range. See https://doi.org/10.1080/01621459.2017.1281813 for details.

Usage

bootstrap_test(data1, data2, m1, m2, epsilon, B = 2000, bnds1 = NULL,
  bnds2 = NULL, plot = FALSE, scal = NULL, off = NULL)

Arguments

data1, data2

data frame for each of the two groups containing the variables referenced in dose and resp

m1, m2

model types. Built-in models are "linlog", "linear", "quadratic", "emax", "exponential", "sigEmax", "betaMod" and "logistic"

epsilon

positive argument specifying the hypotheses of the test

B

number of bootstrap replications. If missing, default value of B is 5000

bnds1, bnds2

bounds for the non-linear model parameters. If not specified, they will be generated automatically

plot

if TRUE, a plot of the absolute difference curve of the two estimated models will be given

scal, off

fixed dose scaling/offset parameter for the Beta/ Linear in log model. If not specified, they are 1.2*max(dose) and 1 respectively

Value

A list containing the p.value, the maximum absolute difference of the models, the estimated model parameters and the number of bootstrap replications. Furthermore plots of the two models are given.

References

https://doi.org/10.1080/01621459.2017.1281813

Examples

data(IBScovars)
male<-IBScovars[1:118,]
female<-IBScovars[119:369,]
bootstrap_test(male,female,"linear","emax",epsilon=0.35,B=300)

Implementation of absolute difference function

Description

Function calculating the absolute difference of two dose response models:

dff(d,β1,β2)=m1(d,β1)m2(d,β2)dff(d,\beta_1,\beta_2)=|m_1(d,\beta_1)-m_2(d,\beta_2)|

Usage

dff(d, beta1, beta2, m1, m2)

Arguments

d

real-valued argument to the function (dose variable)

beta1, beta2

model parameters (real vectors)

m1, m2

model types. Built-in models are "linlog", "linear", "quadratic", "emax", "exponential", "sigEmax", "betaMod" and "logistic"

Value

Response value for the absolute difference of two models.


Implementation of EMAX models

Description

Emax model:

m(d,β)=E0+EmaxdED50+dm(d,\beta)=E_0+E_{max}\frac{d}{ED_{50}+d}

Usage

emax(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value.


Implementation of exponential models

Description

Exponential model:

m(d,β)=E0+E1(exp(d/δ)1)m(d,\beta)=E_0+E_1(exp(d/\delta)-1)

Usage

exponential(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value.


Implementation of linear models

Description

Linear model:

m(d,β)=E0+δdm(d,\beta)=E_0+\delta d

Usage

linear(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value.


Implementation of linear in log models

Description

Linear in log Model model:

m(d,β)=E0+δ log(d+off)m(d,\beta)=E_0+\delta\ log(d+off)

and offoff is a fixed offset parameter.

Usage

linlog(d, e, off)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

off

fixed offset parameter

Value

Response value.


Implementation of logistic models

Description

Logistic model:

m(d,β)=E0+Emax1+exp[(ED50d)/δ]m(d,\beta)=E_0+\frac{E_{max}}{1+exp[(ED_{50}-d)/\delta]}

Usage

logistic(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value.


Implementation of quadratic models

Description

Quadratic model:

m(d,β)=E0+β1d+β2d2m(d,\beta)=E_0+\beta_1 d+\beta_2 d^2

Usage

quadratic(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value.


Implementation of Sigmoid Emax models

Description

Sigmoid Emax Model model:

m(d,β)=E0+EmaxdhED50h+dhm(d,\beta)=E_0+E_{max} \frac{d^h}{ED_{50}^h+d^h}

Usage

sigEmax(d, e)

Arguments

d

real-valued argument to the function (dose variable)

e

model parameter

Value

Response value