Description Usage Arguments Details Value References See Also Examples
Convenience wrapper for point and interval estimation of the "dose" that would generate a target
"response" value, using CIR and IR.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
y 
can be either of the following: y values (response rates), a 2column matrix with positive/negative response counts by dose, a 
x 
dose levels (if not included in y). 
wt 
weights (if not included in y). 
target 
A vector of target response rate(s), for which the percentile dose estimate is needed. See Note. 
estfun 
the function to be used for point estimation. Default 
intfun 
the function to be used for interval estimation. Default 
delta 
logical: should intervals be calculated using the delta ("local") method (default, 
conf 
numeric, the interval's confidence level as a fraction in (0,1). Default 0.9. 
resolution 
numeric: how fine should the grid for the inverseinterval approximation be? Default 100, which seems to be quite enough. See 'Details'. 
extrapolate 
logical: should extrapolation beyond the range of estimated y values be allowed? Default 
adaptiveShrink 
logical, should the yvalues be preshrunk towards an experiment's target? Recommended when the data were obtained via an adaptive dosefinding design. See 
starget 
The shrinkage target. Defaults to 
adaptiveCurve 
logical, should the CIs be expanded by using a parabolic curve between estimation points rather than straight interpolation (default 
... 
Other arguments passed on to 
The inverse point estimate is calculated in a straightforward manner from a forward estimate, using doseFind
. For the inverse interval, the default option (delta=TRUE
) calls deltaInverse
for a "local" (Delta) inversion of the forward intervals.
If delta=FALSE
, a second call to quickIsotone
generates a highresolution grid outlining the forward intervals. Then the algorithm "draws a horizontal line" at y=target
to find the right and left bounds on this grid. Note that the right (upper) dosefinding confidence bound is found on the lower forward confidence bound, and vice versa. This approach is not recommended, tending to produce CIs that are too wide.
If the data were obtained from an adaptive dosefinding design and you seek to estimate a dose other than the experiment's target, note that away from the target the estimates are likely biased (Flournoy and Oron, 2019). Use adaptiveShrink=TRUE
to mitigate the bias. In addition, either provide the true target as starget
, or a vector of values to target
, with the first value being the true target.
A data frame with 4 elements:
target
The userprovided target values of y, at which x is estimated
point
The point estimates of x
lowerPPconf,upperPPconf
the intervalboundary estimates for a 'PP'=100*conf
confidence interval
Flournoy N and Oron AP, 2020. Bias Induced by Adaptive DoseFinding Designs. Journal of Applied Statistics 47, 24312442.
quickIsotone
,doseFind
,deltaInverse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  # Interesting run (#664) from a simulated upanddown ensemble:
# (x will be autogenerated as dose levels 1:5)
dat=doseResponse(y=c(1/7,1/8,1/2,1/4,4/17),wt=c(7,24,20,12,17))
# The experiment's goal is to find the 30th percentile
inv1=quickInverse(dat,target=0.3)
# With old PAVA as the forward estimator:
inv0=quickInverse(dat,target=0.3,estfun=oldPAVA)
### Showing the data and the estimates
par(mar=c(3,3,1,1),mgp=c(2,.5,0),tcl=0.25)
plot(dat,ylim=c(0.05,0.55),refsize=4,las=1) # uses plot.doseResponse()
# The true response function; true target is where it crosses the y=0.3 line
lines(seq(1,5,0.1),pweibull(seq(1,5,0.1),shape=1.1615,scale=8.4839),col=4)
abline(h=0.3,col=2,lty=3)
# Plotting the point estimates, as "tick" marks on the y=0.3 line
lines(rep(inv1$point,2),c(0.25,0.35)) # CIR
lines(rep(inv0$point,2),c(0.25,0.35),lty=2) # IR
# You could plot the CIs too, but they are very broad and much more similar than the
# point estimates. The broadness likely reflects the shallow slope, which itself reflects the
# monotonicity violations.
# Here's code to plot the CIR 90% CI as a lightgreen rectangle:
# rect(inv1$lower90conf,0.25,inv1$upper90conf,0.35,col=rgb(0,1,0,alpha=0.3),border=NA)
legend('topleft',pch=c(NA,'X',NA,NA),lty=c(1,NA,2,1),col=c(4,1,1,1),
legend=c('True Curve','Observations','IR Estimate','CIR Estimate'),bty='n')

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.