Description Usage Arguments Details Value See Also Examples

View source: R/analIntervals.r

Calculate left-bound to right-bound intervals for the dose point estimates, using local slopes at design points (places where observations exist) to invert the forward lower-upper bounds.

1 2 3 4 5 6 7 8 | ```
deltaInverse(
isotPoint,
target = NULL,
intfun = morrisCI,
conf = 0.9,
adaptiveCurve = FALSE,
...
)
``` |

`isotPoint` |
The output of an estimation function such as |

`target` |
A vector of target response rate(s), for which the interval is needed. If |

`intfun` |
the function to be used for initial (forward) interval estimation. Default |

`conf` |
numeric, the interval's confidence level as a fraction in (0,1). Default 0.9. |

`adaptiveCurve` |
logical, should the CIs be expanded by using a parabolic curve between estimation points rather than straight interpolation (default |

`...` |
additional arguments passed on to |

The Delta method in this application boils down to dividing the distance to the forward (vertical) bounds, by the slope, to get the left/right interval width. Slope estimates are performed by `slope`

. An alternative method (dubbed "global") is hard-coded into `quickInverse`

.

two-column matrix with the left and right bounds, respectively

`quickIsotone`

,`quickInverse`

,`isotInterval`

,
`slope`

; `DRshrink`

for the shrinkage fix.

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 28 29 30 31 32 33 34 | ```
# Interesting run (#664) from a simulated up-and-down ensemble:
# (x will be auto-generated 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
quick1=quickIsotone(dat)
# For inverse confidence intervals "the long way",
# we need a full CIR output object:
fwd1=cirPAVA(dat, full=TRUE)
invDelta=deltaInverse(fwd1)
### Showing the data and the estimates
par(mar=c(3,3,4,1),mgp=c(2,.5,0),tcl=-0.25)
# Following command uses plot.doseResponse()
plot(dat,ylim=c(0.05,0.55),refsize=4,las=1,xlim=c(-1,6),main="Inverse-Estimation CIs")
# The true response function; true target is where it crosses the y=0.3 line
lines(seq(0,7,0.1),pweibull(seq(0,7,0.1),shape=1.1615,scale=8.4839),col=4)
abline(h=0.3,col=2,lty=3) ### The experiment's official target
# Forward CIs; the "global" inverse interval just draws horizontal lines between them
# To get "global" values calculated for you at specific targets, choose 'delta=FALSE'
# when calling quickInverse()
lines(quick1$lower90conf,lty=2,col=3)
lines(quick1$upper90conf,lty=2,col=3)
# Note how for y=0.3, both bounds are infinite (i.e., no intersection with the horizontal line)
# unless one dares to extrapolate outside range of observations.
# Now, the default "local" inverse interval, which is finite for the range of estimated y values.
# In particular, it is finite (albeit very wide) for y=0.3.
lines(invDelta[,1],quick1$y,lty=2)
lines(invDelta[,2],quick1$y,lty=2)
legend('topleft',pch=c(NA,'X',NA,NA),lty=c(1,NA,2,2),col=c(4,1,1,3),legend=
c('True Curve','Observations','Local Interval (default)','Forward/Global Interval'),bty='n')
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.