Learn R Programming

dfpk (version 2.0.0)

nsim: Simulate one or more Phase I clinical trial(s) using the PK measure in the dose finding design.

Description

nsim is used to generate "n" 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 total number of enrolled patients.
cohort
The number of cohorts in the trial.
icon
The index of real blood sampling.
theta
The toxicity (probability) target.
p_0
The skeleton of CRM; defaults to NULL. (must be defined only in the PKCRM model)
L
A threshold set before starting the trial; defaults to NULL. (must be defined only in the PKCRM model)
model
A character string to specify the working model which will be used in the simulation.
scenarios
A generated scenario including the PK data.
betapriors
A vector of the regression parameters in the selected model.
options
A list of three integers specifying the stan model's options: the number of chains, the number of iterations for each chain and the number of warmup iterations.
TR
The number of replicates clinical trials.

References

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

See Also

scenarios

Examples

Run this code
  ## Not run: 
# TR = 1000                             # Total number of simulations
# 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, 0.05, 0.1, 0.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 = 0                              
# L = 0 
# 
# ##############################################
# ############### Select a model ###############
# ##############################################
# 
# model = pktox        
# betapriors = NULL 
# 
# ################################################
# #### Set the Stan model's options as a list ####
# ################################################
# 
# options <- list(nchains = 4, 
#                 niter = 4000, 
#                 nadapt = 0.9) 
# 
# ############################################
# ############ Run the simulation(s) ############
# ############################################
# 
# 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