Learn R Programming

dfpk (version 1.0)

nsim: More than one simulation using PK measure in the dose finding design

Description

nsim is used to generate simulations of phase I trial using the PK data and then link them to toxicity under a specified dose-toxicity configuration. The objective is to determine the maximum tolerated dose (MTD).

Usage

nsim(d, N, cohort, icon, theta, p_0, L, model, scenarios,betapriors, options, TR)

Arguments

d
A vector of dose levels assigned to patients.
N
The number of enrolled patients.
cohort
The number of cohorts.
icon
The index of real blood sampling.
theta
The toxicity (probability) target.
p_0
Skeleton of CRM.
L
A threshold set before starting the trial.
model
A character string to specify the working model used in the method.
scenarios
A scenarios with the PK data.
betapriors
A vector of the regression parameters for a specific model.
options
A list of three integers specifying the stan model's number of chains, how many iterations for each chain and the number of warmup iterations; defaults to options <- list(nchains = 4, niter = 4000, nadapt = 0.8).
TR
The number of simulations.

References

Ursino, M., et al, (2016) Dose-finding methods using pharmacokinetics in small populations (under review).

See Also

scenarios, sim.

Examples

Run this code
  ## Not run: 
# ##############################################
# ############ Generate scenarios ##############
# ##############################################
# 
# TR = 100
# limit_tox <- 10.96                  
# N <- 42                         
# param_pk <- c(2,10,100)             # PK parameters ka,CL,V
# omega2 <- 0.7                       
# omega_a <- 0                      
# preal <- c(0.001,.05,0.1,.2,0.35,0.45)         
# time_sampling <- seq(0,24,length.out=48)      
# sigma2 <- c(rep(0.2,length(time_sampling)), rep(0.2,length(time_sampling)))          
# # sigma2: Additive or proportional error
# 
# gen.scen <- scenarios(param_pk,omega2,omega_a,sigma2,preal,limit_tox,time_sampling, N)
# 
# cohort = 1
# scenarios <- gen.scen
# d <- scenarios@doses
# icon <- c(2:6,round(seq(9,48,((48-9)/4))))      
# theta <- 0.2                                    
# p_0 = NULL                                  
# L = NULL
# 
# ######################################
# ############### Models ###############
# ######################################
# 
# model = pktox  # Use one of the models in the dfpk package 
# betapriors = NULL
# 
# ################################################
# #### Set the stan model's options as a list ####
# ################################################
# 
# options <- list(nchains = 4,
#                 niter = 4000,
#                 nadapt = 0.9)   
# 
# ############################################
# ############ Run the simulation ############
# ############################################
# 
# results_sim <- nsim(d, N, cohort, icon, theta, p_0, L, model, gen.scen, betapriors, options, TR)
# results_sim
#   ## End(Not run)

Run the code above in your browser using DataLab