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: | Fengru Wang, Yongbo Gan, Zhijian Yang, Wei Mei |
Maintainer: | Fengru Wang <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2025-03-01 03:19:47 UTC |
Source: | https://github.com/cran/ed50simulation |
Estimate confidence interval of ED50 using isotonic regression based on bootstrap method.
bootBC.ci(tObserved, tBoot, conf = 0.95)
bootBC.ci(tObserved, tBoot, conf = 0.95)
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. |
library(ed50simulation) 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)
library(ed50simulation) 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)
Function of isotonic regression.
bootIsotonicRegression(data, PROBABILITY.GAMMA = 0.5, baselinePava)
bootIsotonicRegression(data, PROBABILITY.GAMMA = 0.5, baselinePava)
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. |
library(ed50simulation) pavaData <- preparePava(groupS) bootIsotonicRegression(data = groupS, PROBABILITY.GAMMA = 0.5, baselinePava = pavaData)
library(ed50simulation) pavaData <- preparePava(groupS) bootIsotonicRegression(data = groupS, PROBABILITY.GAMMA = 0.5, baselinePava = pavaData)
The function is designed as an argument for the boot function of the Canty Bootstrap package.
bootIsotonicResample(data, mle)
bootIsotonicResample(data, mle)
data |
Original experiment data. |
mle |
A list of additional arguments to be used by bootIsotonicResample. |
library(ed50simulation) pavaData <- preparePava(groupS) bootIsotonicResample(data = groupS, mle = list(baselinePava = pavaData, firstDose = 2.5, PROBABILITY.GAMMA = 0.5))
library(ed50simulation) pavaData <- preparePava(groupS) bootIsotonicResample(data = groupS, mle = list(baselinePava = pavaData, firstDose = 2.5, PROBABILITY.GAMMA = 0.5))
Test the statistical difference of two independent estimation results of ED50.
compare(group1, group2, alpha = 0.05)
compare(group1, group2, alpha = 0.05)
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. |
The difference between two groups of ED50 estimation in terms of statistical significance.
Noguchi, K., & Marmolejo-Ramos, F. (2016)<doi:10.1080/00031305.2016.1200487>. Assessing equality of means using the overlap of range-preserving confidence intervals. American Statistician, 70(4), 325-334.
library(ed50simulation) ans1 <- estimate(groupS$doseSequence, groupS$responseSequence, method = 'ModTurPoint') ans2 <- estimate(groupSN$doseSequence, groupSN$responseSequence, method = 'Dixon-Mood') compare(ans1, ans2)
library(ed50simulation) ans1 <- estimate(groupS$doseSequence, groupS$responseSequence, method = 'ModTurPoint') ans2 <- estimate(groupSN$doseSequence, groupSN$responseSequence, method = 'Dixon-Mood') compare(ans1, ans2)
Estimate 50 percent effective dose using different methods.
estimate(doseSequence, doseResponse, confidence = 0.95, method = c("Dixon-Mood", "Choi", "ModTurPoint", "Logistic", "Isotonic"), tpCiScale = 1, boot.n = 2000)
estimate(doseSequence, doseResponse, confidence = 0.95, method = c("Dixon-Mood", "Choi", "ModTurPoint", "Logistic", "Isotonic"), tpCiScale = 1, boot.n = 2000)
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 |
boot.n |
The number of boot process if Logistic method is chosen to estimate ED50. |
A list of estimation result consisting of method of estimation, ED50 estimate, standard error of ED50 estimate, confidence level and estimate of confidence interval. The return value of the function is a list consisting of the method used Method of Estimation', the estimation of the ed50 value'Estimate of ED50', the standard error of the estimation'Standard Error of Estimate', the confidence level 'Confidence Level' and the lower and the upper bound of the confidence interval 'Lower Bound'& 'Upper Bound'. For Dixon-Mood estimation, the value of the parameter G will also be given as 'Value of Parameter G' in the list.
Dixon, W. J., & Mood, A. M. (1948) <doi:10.1080/01621459.1948.10483254>. A method for obtaining and analyzing sensitivity data. Publications of the American Statistical Association, 43(241), 109-126. Choi, S. C. (1990)<doi:10.2307/2531453>. Interval estimation of the ld50based on an up-and-down experiment. Biometrics, 46(2), 485-492. Pace, N. L., & Stylianou, M. P. (2007)<doi:10.1097/01.anes.0000267514.42592.2a>. 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.
library(ed50simulation) estimate(groupS$doseSequence, groupS$responseSequence, method = 'Dixon-Mood') estimate(groupS$doseSequence, groupS$responseSequence, method = 'Logistic', boot.n = 1000)
library(ed50simulation) estimate(groupS$doseSequence, groupS$responseSequence, method = 'Dixon-Mood') estimate(groupS$doseSequence, groupS$responseSequence, method = 'Logistic', boot.n = 1000)
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.
generateData(number, useTurPoint = F, start, doseStep = 1, distribution = c("Normal", "Triangle", "Chi-square"), normalMean = 0, normalStd = 1, triMean = 0, triWidth = 2, chiDegree = 1)
generateData(number, useTurPoint = F, start, doseStep = 1, distribution = c("Normal", "Triangle", "Chi-square"), normalMean = 0, normalStd = 1, triMean = 0, triWidth = 2, chiDegree = 1)
number |
The number of experiments in a trail. |
useTurPoint |
A logical value indicating whether the parameter |
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. |
A data frame.
library(ed50simulation) generateData(number = 20, start = 2, doseStep = 0.2, distribution = 'Normal') generateData(number = 40, start = 2, doseStep = 0.2, distribution = 'Chi-square')
library(ed50simulation) generateData(number = 20, start = 2, doseStep = 0.2, distribution = 'Normal') generateData(number = 40, start = 2, doseStep = 0.2, distribution = 'Chi-square')
A group of real experiment data based on up-and-down method.
groupS
groupS
A data of 36 samples and 2 variables:
A value of 0 or 1 indicating the experiment outcome. 0 refers to a failure outcome while 1 refers to a success.
The dose given in each experiment.
The data is from the article in the references below.
Niu B, Xiao JY, Fang Y, et al<doi:10.1111/anae.13843>. Sevoflurane-induced isoelectric EEG and burst suppression: differential and antagonistic effect of added nitrous oxide. Anaesthesia 2017; 72: 570-9.
A group of real experiment data based on up-and-down method.
groupSN
groupSN
A data of 38 samples and 2 variables:
A value of 0 or 1 indicating the experiment outcome. 0 refers to a failure outcome while 1 refers to a success.
The dose given in each experiment.
The data is from the article in the references below.
Niu B, Xiao JY, Fang Y, et al<doi:10.1111/anae.13843>. Sevoflurane-induced isoelectric EEG and burst suppression: differential and antagonistic effect of added nitrous oxide. Anaesthesia 2017; 72: 570-9.
A table containing parameter G used in Dixon-Mood method.
gTableOrigin
gTableOrigin
A data table containing 3 columns:
The ratio of dose step and estimate standard error
The value of parameter G when the estimate of ED50 falls on a dose level
The value of parameter G when the estimate of ED50 falls between two dose levels
The table is obtained from Figure 2 in the reference below
Dixon, W. J., & Mood, A. M. (1948) <doi:10.1080/01621459.1948.10483254>. A method for obtaining and analyzing sensitivity data. Publications of the American Statistical Association, 43(241), 109-126.
Covert data using PAVA algorithm, the result is uesd for isotonic regression estimation.
preparePava(data)
preparePava(data)
data |
A data frame of dose experiments. |
library(ed50simulation) preparePava(groupS) preparePava(groupSN)
library(ed50simulation) preparePava(groupS) preparePava(groupSN)