cirPAVA: Returns centered-isotonic-regression estimate In cir: Centered Isotonic Regression and Dose-Response Utilities

Description

Nonparametric forward point estimation of a monotone response (y) as a function of dose (x), using the centered-isotonic-regression (CIR) algorithm.

Usage

 1 2 3 4 5 6 7 8 9 10 11 12 13 cirPAVA( y, x = NULL, wt = NULL, outx = NULL, full = FALSE, dec = FALSE, strict = FALSE, interiorStrict = TRUE, ybounds = 0:1, adaptiveShrink = FALSE, ... )

Arguments

 y can be either of the following: y values (response rates), a DRtrace object,a doseResponse object, or valid input (potentially together with x,wt) to generate a doseResponse object. See doseResponse help for more. x dose levels (if not included in y). wt weights (if not included in y). outx vector of x values for which predictions will be made. If NULL (default), this will be set to the set of unique values in the x argument (or equivalently in y\$x). Non-NULL inputs are relevant only if full=TRUE. full logical, is a more complete output desired? if FALSE (default), only a vector of point estimates for y at the provided dose levels is returned dec logical, is the true function is assumed to be monotone decreasing? Default FALSE. strict logical, should CIR enforce strict monotonicity by "fixing" flat intervals as well? Default FALSE. interiorStrict logical, should CIR enforce strict monotonicity, but only for y values inside of ybounds? Default TRUE. Choosing FALSE will be overridden if strict=TRUE, and a warning will be given. ybounds numeric vector of length 2, relevant only under the default setting of strict=FALSE,interiorStrict=TRUE. Default 0:1. See 'Details'. adaptiveShrink logical, should the y-values be pre-shrunk towards an experiment's target? Recommended if data were obtained via an adaptive dose-finding design. If TRUE, then must also provide a target argument that will be passed via .... ... Other arguments passed on to pre-processing functions.

Details

This is the underlying "engine" function implementing CIR. For a quick and somewhat more user-friendly wrapper, use quickIsotone. CIR is a variation of isotonic regression (IR) that shrinks IR's constant ("flat") intervals to single points and interpolates between these points, generating a curve that is strictly monotone everywhere except (possibly) near the boundaries.

Flat intervals in the raw input data, are handled with care. Under the default setting (strict=FALSE,interiorStrict=TRUE), flat intervals are treated as monotonicity violations, unless the \$y\$ value is on the boundary of its allowed range (default \$[0,1]\$, appropriate for binary-response data). On that boundary, flat intervals are left unchanged.

The algorithm is documented and discussed in Oron and Flournoy (2017). The function now include an adaptiveShrink option, to mitigate bias caused when using adaptive designs (Flournoy and Oron, 2020).

Value

under default, returns a vector of y estimates at unique x values. With full=TRUE, returns a list of 3 doseResponse objects name output,input,shrinkage for the output data at dose levels, the input data, and the function as fit at algorithm-generated shrinkage points, respectively.

Author(s)

Assaf P. Oron <assaf.oron.at.gmail.com>

References

Oron, A.P. and Flournoy, N., 2017. Centered Isotonic Regression: Point and Interval Estimation for Dose-Response Studies. Statistics in Biopharmaceutical Research 9, 258-267. (author's public version available on arxiv.org).

Flournoy, N. and Oron, A.P., 2020. Bias Induced by Adaptive Dose-Finding Designs. Journal of Applied Statistics 47, 2431-2442.

Examples

 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 35 # 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)) # CIR, using the default 'quick' function that also provides CIs (default 90%). quick1=quickIsotone(dat) quick1 # Use 'estfun' argument to operate the same function with old PAVA as the estimator quick0=quickIsotone(dat,estfun=oldPAVA) quick0 ### Showing the data and the fits par(mar=c(3,3,1,1),mgp=c(2,.5,0),tcl=-0.25) plot(dat,ylim=c(0.05,0.55),refsize=1,las=1) # uses plot.doseResponse() # The IR fit: a straightforward interpolation lines(quick0\$y,lty=2) # With CIR, 'quickIsotone' cannot show us the true underlying interpolation; # it only provides the estimates at requested points. Interpolation should be done between # shrinkage points, not the original design points. So we must call the full 'cirPAVA' function: slow1=cirPAVA(dat,full=TRUE) # Now, compare these 3 (the first one is wrong, b/c it interpolates from design points): midpts=1:4+0.5 approx(1:5,quick1\$y,xout=midpts)\$y quickIsotone(dat,outx=midpts) # instead, you can just call 'quickIsotone' and specify 'outx' approx(slow1\$shrinkage\$x,slow1\$shrinkage\$y,xout=midpts)\$y # Or use 'cirPAVA' # Ok... finally plotting the CIR curve # Both flat intervals are shrunk, because neither are at y=0 or y=1 lines(slow1\$shrinkage\$x,slow1\$shrinkage\$y) # Last but not least, here's the true response function lines(seq(1,5,0.1),pweibull(seq(1,5,0.1),shape=1.1615,scale=8.4839),col=2) legend('topleft',pch=c(NA,'X',NA,NA),lty=c(1,NA,2,1),col=c(2,1,1,1), legend=c('True Curve','Observations','IR','CIR'),bty='n')

Example output x         y lower90conf upper90conf
1 1 0.1290323  0.02745104   0.3065700
2 2 0.1517640  0.07119566   0.3065700
3 3 0.2524331  0.12910405   0.4198442
4 4 0.3469388  0.16899714   0.5395001
5 5 0.3469388  0.20357050   0.5455762
x         y lower90conf upper90conf
1 1 0.1290323  0.02745104   0.2797433
2 2 0.1290323  0.05348681   0.2797433
3 3 0.3469388  0.19985783   0.5131881
4 4 0.3469388  0.19985783   0.5395001
5 5 0.3469388  0.20552738   0.5455762
 0.1403981 0.2020985 0.2996859 0.3469388
x         y lower90conf upper90conf
1 1.5 0.1290323  0.04932335   0.3065700
2 2.5 0.2020985  0.10014986   0.3632071
3 3.5 0.3027676  0.14905060   0.4796721
4 4.5 0.3469388  0.18628382   0.5425381
 0.1290323 0.2020985 0.3027676 0.3469388

cir documentation built on Aug. 23, 2021, 5:10 p.m.