bootstrap_test: Bootstrap test for the equivalence of dose response curves...

Description Usage Arguments Value References Examples

View source: R/bootstrap_test.R

Description

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

H_0: \max_{d\in\mathcal{D}} |m_1(d,β_1)-m_2(d,β_2)|≥q ε\ vs.\ H_1: \max_{d\in\mathcal{D}} |m_1(d,β_1)-m_2(d,β_2)|< ε,

where

\mathcal{D}

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

Usage

1
2
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

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

Example output

Loading required package: lattice
Loading required package: DoseFinding
Loading required package: mvtnorm
Loading required package: alabama
Loading required package: numDeriv
$p.value
[1] 0.08666667

$max.abs.difference
[1] 0.178377

$bootstrap.replications
[1] 300

$estimated.model.param.model1
        e0      delta 
0.39841267 0.04276686 

$estimated.model.param.model2
       e0      eMax      ed50 
0.2200357 0.5171142 1.3956642 

TestingSimilarity documentation built on Sept. 11, 2019, 5:08 p.m.