nsim: Simulate a single or n prospective clinical trial(s) using...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/nsim.R

Description

nsim is used to simulate a single or "n" prospective clinical trial(s) 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

1
2
3
4
 
nsim(doses, N, cohort, icon, theta, model, simulatedData, TR, prob = 0.9, AUCmethod = 2, 
     options = list(nchains = 4, niter = 4000, nadapt = 0.8), betapriors = NULL,
     thetaL=NULL, p0 = 0, L = 0, CI = FALSE, seed = 190591)

Arguments

doses

A vector with the doses panel.

N

The total sample size per trial.

cohort

The cohort size in the trial.

icon

A vector containing the index of real blood sampling.

theta

The toxicity threshold.

model

A character string to specify the selected dose-finding model. See for details dtox, pkcov, pkcrm, pktox, pkpop, pklogit.

simulatedData

A list for each trial containing the simulated datasets; a "scen" object. See for details sim.data.

TR

The total number of trials to be simulated.

prob

The threshold of the posterior probability of toxicity for the stopping rule in the selected model; defaults to 0.9. See for details dtox, pkcov, pkcrm, pktox, pkpop, pklogit.

AUCmethod

A string number specifying the estimation method for AUC. Valid choices are "1" for a "compartmental method" and "2" for non-compartmental method; defaults to 2.

options

A list with the Stan model's options; the 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)

betapriors

A vector with the value for the prior distribution of the regression parameters in the selected model; defaults to NULL.

thetaL

A second threshold of AUC in the pkcrm model; defaults to theta in the PKCRM model and NULL for the models dtox, pkcov, pktox, pkpop and pklogit.

p0

The skeleton of CRM for pkcrm; defaults to NULL.

L

The AUC threshold to be set before starting the trial for pkcrm; defaults to NULL.

CI

A logical constant indicating the estimated 95% credible interval; defaults to FALSE.

seed

The seed of the random number generator that is used at the beginning of each trial; defaults to 190591.

Value

An object of class "dosefinding" is returned, consisting of determination of the next recommended dose and estimations. Objects generated by nsim contain at least the following components:

pid

The patient's ID during the trial.

N

The total sample size per trial.

time

The sampling time points.

doses

A vector with the doses panel.

conc

The estimated concentration values for each patient at each dose.

nchains

The number of chains in the Stan model.

niter

The number of iterations for each chain in the Stan model.

nadapt

The number of warmup iterations.

newDose

The next maximum tolerated dose (MTD) if TR=1 otherwise the percentage of MTD selection for each dose level after all trials starting from dose 0; equals to 0 if the TR=1 has stopped before the end, according to the stopping rules.

MTD

A vector containing the next maximum tolerated doses (MTD) of each trial (TR); equals to 0 if the trial has stopped before the end, according to the stopping rules.

theta

The tocixity threshold.

doseLevels

A vector of dose levels assigned to patients in the trial.

toxicity

The estimated toxicity outcome.

AUCs

A vector with the computed AUC values of each patient.

TR

The total number of trials to be simulated.

preal

The prior toxicity probabilities.

pstim

The mean values of the estimated probabilities of toxicity.

pstimQ1

The 1st quartile of the estimated probabilities of toxicity if CI = TRUE, otherwise is NULL.

pstimQ3

The 3rd quartile of the estimated probabilities of toxicity if CI = TRUE, otherwise is NULL.

model

A character string to specify the selected dose-finding model. See for details dtox, pkcov, pkcrm, pktox, pkpop, pklogit.

seed

The seed of the random number generator that is used at the beginning of each trial.

Author(s)

Artemis Toumazi artemis.toumazi@gmail.com, Moreno Ursino moreno.ursino@inserm.fr, Sarah Zohar sarah.zohar@inserm.fr

References

Ursino, M., et al, (2017) Dose-finding methods for Phase I clinical trials using pharmacokinetics in small populations, Biometrical Journal, <doi:10.1002/bimj.201600084>.

Toumazi, A., et al, (2018) dfpk: An R-package for Bayesian dose-finding designs using pharmacokinetics (PK) for phase I clinical trials, Computer Methods and Programs in Biomedicine, <doi:10.1016/j.cmpb.2018.01.023>.

See Also

sim.data

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
    ## Not run: 
        TR = 10                                 # Total number of simulations                 
        N = 30                         
        limitTox <- 10.96 
        PKparameters <- c(2, 10, 100)             # PK parameters ka,CL,V
        omegaIIV <- 0.7                        
        omegaAlpha <- 0
        doses <- c(12.59972, 34.65492, 44.69007, 60.80685, 83.68946, 100.37111)     
        timeSampling <- seq(0, 24, length.out=48)    
        sigma <- rep(0.2, length(timeSampling))         

        gen.scen <- sim.data(PKparameters,omegaIIV,omegaAlpha,sigma,doses,
                             limitTox,timeSampling, N, TR)

        cohort = 1
        simulatedData <- gen.scen  
        icon <- c(2:6, round(seq(9, 48, ((48-9)/4))))      
        theta <- 0.2                           

        ##############################################
        ############### Select a model ###############
        ##############################################

        model = "pktox"

        ############################################
        ############ Run the simulation(s) #########
        ############################################
        
        results_sim <- nsim(doses, N, cohort, icon, theta, model, simulatedData, TR, 
                            AUCmethod = 1)
        results_sim 
    
## End(Not run)

dfpk documentation built on May 2, 2019, 8:31 a.m.