rCRM: Fit a 2-parameter CRM

Description Usage Arguments Details Value Warning Author(s) References Examples

View source: R/rCRM.R

Description

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.

Usage

1
2
3
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)

Arguments

x

input vector of dose.

y

response variable. y is a binary vector with 0 (not DLT) and 1 (DLT).

dose0

dose regimen. x should be included in dose0.

tp

target toxicity probability. Default is 0.3.

family

type of CRM models. Now only supports 2-paraemter CRM, 2P.

mlambda

maximum of tuning parameter lambda. The optimal lambda is selected by cross-validation.

nlambda

number of lambda values. Default is 50.

rlambda

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.

wldose

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.

nfolds

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.

foldid

an optional vector of values between 1 and nfolds specifying which fold each observation is in. Default is foldid=NULL.

keep.beta

logical flag for returning estimates for all lambda values. For keep.beta = FALSE, only return the estimate with the minimum cross-validation value.

thresh

convergence threshold for coordinate descent. Default value is 1E-7.

maxit

maximum number of iterations for coordinate descent. Default is 1E+4.

threshP

boundary for calculating the probability of DLT. Default is 1E-6. The estimated probability is truncated between 1E-6 and 1-1E-6.

threshB

boundary for calculating the parameters. Default is 100. The estimates are truncated between -100 and 100.

Details

One-step coordinate descent algorithm is applied for each lambda. Cross-validation is used for tuning parameters.

Value

An object with S3 class "rCRM".

Beta

estimates in 2-parameter CRM model.

fit

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.

lambda.min

value of lambda that gives minimum cvm.

flag

convergence flag (for internal debugging). flag = 0 means converged.

prob

estimated probability of DLT at each dose0.

dose.close

the index of dose in dose0 with the prob cloest to tp.

family

type of CRM models. 2P is 2-parameter CRM model.

Warning

It may terminate and return NULL.

Author(s)

Maintainer: Xiang Li <xli256@its.jnj.com>

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

rCRM documentation built on Oct. 23, 2020, 5:54 p.m.