## Not run:
# 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)))
#
# # Generate scenarios
# 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
#
# ######################################
# ############### Models ###############
# ######################################
#
# model = pktox # Use one of the models in the dfpk package
# betapriors = 0
#
# ################################################
# #### Set the stan model's options as a list ####
# ################################################
#
# options <- list(nchains = 4,
# niter = 4000,
# nadapt = 0.9)
#
# ############################################
# ############ Run the simulation ############
# ############################################
#
# results_sim <- sim(d, N, cohort, icon, theta, p_0, L, model, gen.scen, betapriors, options)
# results_sim
# ## End(Not run)
Run the code above in your browser using DataLab