Fit a 2-parameter CRM model (O'Quigley and Shen 1996) regularized with L2 norm (Friedman et al. 2010) adjusted by the distance with the target DLT rate.
rCRM(x, y, dose0, tp = 0.3, family = "2P", mlambda = 1, nlambda = 50, rlambda = NULL,
wldose = NULL, nfolds = length(y), foldid = NULL, keep.beta = FALSE,
thresh = 1e-07, maxit = 1e+04, threshP = 1e-06, threshB = 100)
input vector of dose.
response variable. y
is a binary vector with 0 (not DLT) and 1 (DLT).
dose regimen. x
should be included in dose0
.
target toxicity probability. Default is 0.3.
type of CRM models. Now only supports 2-paraemter CRM, 2P
.
maximum of tuning parameter lambda
. The optimal lambda
is selected by cross-validation.
number of lambda
values. Default is 50.
fraction of mlambda
to determine the smallest value for lambda
. The default is rlambda = 0.0001
when the number of observations is larger than or equal to the number of variables; otherwise, rlambda = 0.01
.
penalty weights used with L2 norm (adaptive L2). The wldose
is a vector of non-negative values with the same length as dose0
. Default is NULL indicating that weights are calculated based on MLE.
number of folds. With nfolds = 1
and foldid = NULL
, cross-validation is not performed. For cross-validation, smallest value allowable is nfolds = 3
. Specifying foldid
overrides nfolds
. Default is nfolds=length(y)
indicating leave-one-out cross-validation.
an optional vector of values between 1 and nfolds
specifying which fold each observation is in. Default is foldid=NULL
.
logical flag for returning estimates for all lambda
values. For keep.beta = FALSE
, only return the estimate with the minimum cross-validation value.
convergence threshold for coordinate descent. Default value is 1E-7
.
maximum number of iterations for coordinate descent. Default is 1E+4
.
boundary for calculating the probability of DLT. Default is 1E-6
. The estimated probability is truncated between 1E-6
and 1-1E-6
.
boundary for calculating the parameters. Default is 100. The estimates are truncated between -100
and 100
.
An object with S3 class "rCRM"
.
estimates in 2-parameter CRM model.
a data.frame containing lambda
and proportion of deviance. With cross-validation, additional results are reported, such as average cross-validation likelihood cvm
and its standard error cvse
, and index
with `*' indicating the minimum cvm
.
value of lambda
that gives minimum cvm
.
convergence flag (for internal debugging). flag = 0
means converged.
estimated probability of DLT at each dose0
.
the index of dose in dose0
with the prob
cloest to tp
.
type of CRM models. 2P
is 2-parameter CRM model.
It may terminate and return NULL
.
One-step coordinate descent algorithm is applied for each lambda
.
Cross-validation is used for tuning parameters.
O'Quigley, J., Shen, L.Z. (1996). Continual reassessment method: a likelihood approach. Biometrics, 673-684. Friedman, J., Hastie, T. and Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent, Journal of Statistical Software, Vol. 33(1), 1.
# NOT RUN {
set.seed(1213)
dose0=c(1:6)
prob0=c(0.007, 0.086, 0.294, 0.545, 0.731, 0.841)
m=3; Y=NULL; X=NULL
for (i in 1:length(dose0)) {
Y=c(Y, rbinom(m, size=1, prob=prob0[i]))
X=c(X, rep(i, m))
}
fiti=rCRM(X, Y, dose0, tp=0.3, mlambda=10)
# attributes(fiti)
# }
Run the code above in your browser using DataLab