Package 'ed50'

Title: Estimate ED50 and Its Confidence Interval
Description: Functions of five estimation method for ED50 (50 percent effective dose) are provided, and they are respectively Dixon-Mood method (1948) <doi:10.2307/2280071>, Choi's original turning point method (1990) <doi:10.2307/2531453> and it's modified version given by us, as well as logistic regression and isotonic regression. Besides, the package also supports comparison between two estimation results.
Authors: Yongbo Gan, Zhijian Yang, Wei Mei
Maintainer: Yongbo Gan <[email protected]>
License: GPL-3
Version: 0.1.1
Built: 2024-10-13 03:01:56 UTC
Source: https://github.com/cran/ed50

Help Index


Estimate Confidence Interval of ED50 Using Isotonic Regression

Description

Estimate confidence interval of ED50 using isotonic regression based on bootstrap method.

Usage

bootBC.ci(tObserved, tBoot, conf = 0.95)

Arguments

tObserved

the vector of observed statistics.

tBoot

The matrix with R rows each of which is a bootstrap replicate of the statistics.

conf

Confidence level.

Examples

library(ed50)
library(boot)
pavaData <- preparePava(groupS)
bootResult <- boot(data = groupS,
              statistic = bootIsotonicRegression,
                      R = 10,
                    sim = 'parametric',
                ran.gen = bootIsotonicResample,
                    mle = list(baselinePava = pavaData,
                                  firstDose = 2.5,
                          PROBABILITY.GAMMA = 0.5),
           baselinePava = pavaData,
      PROBABILITY.GAMMA = 0.5)
bootBC.ci(tObserved = bootResult$t0[3],
              tBoot = bootResult$t[, 3],
               conf = 0.95)

Isotonic Regression Function

Description

Function of isotonic regression.

Usage

bootIsotonicRegression(data, PROBABILITY.GAMMA = 0.5, baselinePava)

Arguments

data

the same dataframe called by the boot function.

PROBABILITY.GAMMA

the target effect probability in the BCD experiment; default = 0.5 and need not be specified.

baselinePava

the dataframe prepared by the function preparePava.

Examples

library(ed50)
pavaData <- preparePava(groupS)
bootIsotonicRegression(data = groupS, PROBABILITY.GAMMA = 0.5, baselinePava = pavaData)

The resample function of isotonic regression

Description

The function is designed as an argument for the boot function of the Canty Bootstrap package.

Usage

bootIsotonicResample(data, mle)

Arguments

data

Original experiment data.

mle

A list of additional arguments to be used by bootIsotonicResample.

Examples

library(ed50)
pavaData <- preparePava(groupS)
bootIsotonicResample(data = groupS,
                      mle = list(baselinePava = pavaData,
                                    firstDose = 2.5,
                            PROBABILITY.GAMMA = 0.5))

Compare ED50 Estimation of Independent Two-sample Case

Description

Test the statistical difference of two independent estimation results of ED50.

Usage

compare(group1, group2, alpha = 0.05)

Arguments

group1

A list object of ED50 estimation.

group2

Another list object of ED50 estimation to be compared with.

alpha

The significant level of test. 0.05 is the defaut value.

Value

The difference between two groups of ED50 estimation in terms of statistical significance.

References

Noguchi, K., & Marmolejo-Ramos, F. (2016). Assessing equality of means using the overlap of range-preserving confidence intervals. American Statistician, 70(4), 325-334.

Examples

library(ed50)
ans1 <- estimate(groupS$doseSequence, groupS$responseSequence, method = 'ModTurPoint')
ans2 <- estimate(groupSN$doseSequence, groupSN$responseSequence, method = 'Dixon-Mood')
compare(ans1, ans2)

Estimate ED50

Description

Estimate 50 percent effective dose using different methods.

Usage

estimate(doseSequence, doseResponse, confidence = 0.95,
  method = c("Dixon-Mood", "Choi", "ModTurPoint", "Logistic",
  "Isotonic"), tpCiScale = 2.4/qnorm(0.975), boot.n = 10000)

Arguments

doseSequence

A sequence of doses given in order

doseResponse

A sequence of response results shown in order

confidence

The confidence level of interval estimate

method

The method used to estimate ED50, there are five methods here, respectively Dixon-Mood, Choi (Choi's Original Turning Point), ModTurPoint (Modified Turning Point), Logistic (Logistic Regression) and Isotonic (Isotonic Regression). The defaut is Dixon-Mood.

tpCiScale

The scale level to enlarge the confidence interval estimated by Modified Turning Point Method. The default value is 2.4/qnorm(0.975).

boot.n

The number of boot process if Logistic method is chosen to estimate ED50.

Value

A list of estimation result consisting of method of estimation, ED50 estimate, standard error of ED50 estimate, confidence level and estimate of confidence interval.

References

Dixon, W. J., & Mood, A. M. (1948). A method for obtaining and analyzing sensitivity data. Publications of the American Statistical Association, 43(241), 109-126. Choi, S. C. (1990). Interval estimation of the ld50based on an up-and-down experiment. Biometrics, 46(2), 485-492. Pace, N. L., & Stylianou, M. P. (2007). Advances in and limitations of up-and-down methodology: a precis of clinical use, study design, and dose estimation in anesthesia research. Anesthesiology, 107(1), 144-52.

Examples

library(ed50)
estimate(groupS$doseSequence, groupS$responseSequence, method = 'Dixon-Mood')
estimate(groupS$doseSequence, groupS$responseSequence, method = 'Logistic', boot.n = 1000)

Generate Simulation Data of Up-and-Down Experiment

Description

The function is used to generate simulation data of up-and-down experiment, and provide three cases that tolerance distribution obeys normal, triangle or chi-square distribution.

Usage

generateData(number, useTurPoint = FALSE, start, doseStep = 1,
  distribution = c("Normal", "Triangle", "Chi-square"), normalMean = 0,
  normalStd = 1, triMean = 0, triWidth = 2, chiDegree = 1)

Arguments

number

The number of experiments in a trail.

useTurPoint

A logical value indicating whether the parameter number refers to the amount of turning points. The default value is FALSE.

start

The first dose level given in this trail.

doseStep

A fix value that represents the difference between two adjacent dose levels.

distribution

The tolerance distribution, including normal, triangle and chi-square distribution, and the default distribution is N(0, 1).

normalMean

Parameter mean of normal distribution, the default value is 0.

normalStd

Parameter std of normal distribution, the default value is 1.

triMean

Parameter mean of triangle distribution, the default value is 0.

triWidth

Parameter width of triangle distribution, the default value is 2.

chiDegree

Parameter degree of freedom of chi-square distribution, the default value is 1.

Value

A data frame.

Examples

library(ed50)
generateData(number = 20, start = 2, doseStep = 0.2, distribution = 'Normal')
generateData(number = 40, start = 2, doseStep = 0.2, distribution = 'Chi-square')

A Real Experiment Dose Data

Description

A group of real experiment data based on up-and-down method.

Usage

groupS

Format

A data of 36 samples and 2 variables:

responseSequence

A value of 0 or 1 indicating the experiment outcome. 0 refers to a failure outcome while 1 refers to a success.

doseSequence

The dose given in each experiment.

Source

The data is from the article in the references below.

References

Niu B, Xiao JY, Fang Y, et al. Sevoflurane-induced isoelectric EEG and burst suppression: differential and antagonistic effect of added nitrous oxide. Anaesthesia 2017; 72: 570-9.


A Real Experiment Dose Data

Description

A group of real experiment data based on up-and-down method.

Usage

groupSN

Format

A data of 38 samples and 2 variables:

responseSequence

A value of 0 or 1 indicating the experiment outcome. 0 refers to a failure outcome while 1 refers to a success.

doseSequence

The dose given in each experiment.

Source

The data is from the article in the references below.

References

Niu B, Xiao JY, Fang Y, et al. Sevoflurane-induced isoelectric EEG and burst suppression: differential and antagonistic effect of added nitrous oxide. Anaesthesia 2017; 72: 570-9.


G Table

Description

A table containing parameter G used in Dixon-Mood method.

Usage

gTableOrigin

Format

A data table containing 3 columns:

Ratio

The ratio of dose step and estimate standard error

G1

The value of parameter G when the estimate of ED50 falls on a dose level

G2

The value of parameter G when the estimate of ED50 falls between two dose levels

Source

The table is obtained from Figure 2 in the reference below

References

Dixon, W. J., & Mood, A. M. (1948). A method for obtaining and analyzing sensitivity data. Publications of the American Statistical Association, 43(241), 109-126.


Covert Data Using PAVA Algorithm

Description

Covert data using PAVA algorithm, the result is uesd for isotonic regression estimation.

Usage

preparePava(data)

Arguments

data

A data frame of dose experiments.

Examples

library(ed50)
preparePava(groupS)
preparePava(groupSN)