From aa2b65c641e0b8703fce18924c39f2523d8494b6 Mon Sep 17 00:00:00 2001 From: Andrew Hooker Date: Tue, 21 Nov 2023 12:28:57 +0100 Subject: [PATCH] Updating webpage --- R/models.R | 12 ++-- man/blockheader.Rd | 6 +- man/create.poped.database.Rd | 25 ++++---- man/ed_laplace_ofv.Rd | 12 ++-- man/ff.PK.1.comp.oral.md.CL.Rd | 2 +- man/ff.PK.1.comp.oral.md.KE.Rd | 2 +- man/ff.PK.1.comp.oral.sd.CL.Rd | 2 +- man/ff.PK.1.comp.oral.sd.KE.Rd | 2 +- man/ff.PKPD.1.comp.oral.md.CL.imax.Rd | 2 +- man/ff.PKPD.1.comp.sd.CL.emax.Rd | 2 +- man/plot_model_prediction.Rd | 31 +++++----- man/poped_optim.Rd | 62 ++++++++++--------- man/poped_optimize.Rd | 29 ++++----- pkgdown/_pkgdown.yml | 2 +- .../examples_fcn_doc/examples_blockheader.R | 6 +- .../examples_create.poped.database.R | 25 ++++---- .../examples_ed_laplace_ofv.R | 12 ++-- .../examples_plot_model_prediction.R | 31 +++++----- .../examples_fcn_doc/examples_poped_optim.R | 62 ++++++++++--------- .../examples_poped_optimize.R | 29 ++++----- 20 files changed, 183 insertions(+), 173 deletions(-) diff --git a/R/models.R b/R/models.R index d26048d7..68a960e9 100644 --- a/R/models.R +++ b/R/models.R @@ -3,7 +3,7 @@ #' This is a structural model function that encodes a model that is #' one-compartment, oral absorption, multiple bolus dose, parameterized using KE. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @param model_switch a vector of values, the same size as \code{xt}, identifying which model #' response should be computed for the @@ -43,7 +43,7 @@ ff.PK.1.comp.oral.md.KE <- function(model_switch,xt,parameters,poped.db){ #' This is a structural model function that encodes a model that is #' one-compartment, oral absorption, multiple bolus dose, parameterized using CL. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @inheritParams ff.PK.1.comp.oral.md.KE #' @@ -77,7 +77,7 @@ ff.PK.1.comp.oral.md.CL <- function(model_switch,xt,parameters,poped.db){ #' This is a structural model function that encodes a model that is #' one-compartment, oral absorption, single bolus dose, parameterized using KE. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @inheritParams ff.PK.1.comp.oral.md.KE #' @@ -111,7 +111,7 @@ ff.PK.1.comp.oral.sd.KE <- function(model_switch,xt,parameters,poped.db){ #' This is a structural model function that encodes a model that is #' one-compartment, oral absorption, single bolus dose, parameterized using CL. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @inheritParams ff.PK.1.comp.oral.md.KE #' @@ -141,7 +141,7 @@ ff.PK.1.comp.oral.sd.CL <- function(model_switch,xt,parameters,poped.db){ #' #' This is a structural model function that encodes the model described above. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @inheritParams ff.PK.1.comp.oral.md.KE #' @@ -180,7 +180,7 @@ ff.PKPD.1.comp.sd.CL.emax <- function(model_switch,xt,parameters,poped.db){ #' #' This is a structural model function that encodes the model described above. #' The function is suitable for input to the \code{\link{create.poped.database}} function using the -#' \code{ff_file} argument. +#' \code{ff_fun} or \code{ff_file} argument. #' #' @inheritParams ff.PK.1.comp.oral.md.KE #' diff --git a/man/blockheader.Rd b/man/blockheader.Rd index e3c39c0c..e04ad257 100644 --- a/man/blockheader.Rd +++ b/man/blockheader.Rd @@ -183,9 +183,9 @@ blockheader(name='', docc=poped.db$parameters$docc,sigma=poped.db$parameters$param.pt.val$sigma) -poped.db.1 <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", +poped.db.1 <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), diff --git a/man/create.poped.database.Rd b/man/create.poped.database.Rd index b4212879..3a7daafc 100644 --- a/man/create.poped.database.Rd +++ b/man/create.poped.database.Rd @@ -597,18 +597,19 @@ sfg <- function(x,a,bpop,b,bocc){ } ## -- Define initial design and design space -poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.prop", - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=0.01, - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70) +poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=0.01, + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70) ## evaluate initial design diff --git a/man/ed_laplace_ofv.Rd b/man/ed_laplace_ofv.Rd index de63f0a2..587fa3b7 100644 --- a/man/ed_laplace_ofv.Rd +++ b/man/ed_laplace_ofv.Rd @@ -124,9 +124,9 @@ bpop_vals_ed_n["Favail",] <- c(0,1,0) bpop_vals_ed_n ## -- Define initial design and design space -poped.db.n <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", +poped.db.n <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=bpop_vals_ed_n, notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), @@ -180,9 +180,9 @@ output$E_ofv bpop_vals_ed_ln ## -- Define initial design and design space - poped.db.ln <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", + poped.db.ln <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=bpop_vals_ed_ln, notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), diff --git a/man/ff.PK.1.comp.oral.md.CL.Rd b/man/ff.PK.1.comp.oral.md.CL.Rd index 605e2146..61dc8062 100644 --- a/man/ff.PK.1.comp.oral.md.CL.Rd +++ b/man/ff.PK.1.comp.oral.md.CL.Rd @@ -28,7 +28,7 @@ A list consisting of: This is a structural model function that encodes a model that is one-compartment, oral absorption, multiple bolus dose, parameterized using CL. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ library(PopED) diff --git a/man/ff.PK.1.comp.oral.md.KE.Rd b/man/ff.PK.1.comp.oral.md.KE.Rd index 6c245354..fbb60091 100644 --- a/man/ff.PK.1.comp.oral.md.KE.Rd +++ b/man/ff.PK.1.comp.oral.md.KE.Rd @@ -28,7 +28,7 @@ A list consisting of: This is a structural model function that encodes a model that is one-compartment, oral absorption, multiple bolus dose, parameterized using KE. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ library(PopED) diff --git a/man/ff.PK.1.comp.oral.sd.CL.Rd b/man/ff.PK.1.comp.oral.sd.CL.Rd index d9f5a426..a016d953 100644 --- a/man/ff.PK.1.comp.oral.sd.CL.Rd +++ b/man/ff.PK.1.comp.oral.sd.CL.Rd @@ -28,7 +28,7 @@ A list consisting of: This is a structural model function that encodes a model that is one-compartment, oral absorption, single bolus dose, parameterized using CL. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ library(PopED) diff --git a/man/ff.PK.1.comp.oral.sd.KE.Rd b/man/ff.PK.1.comp.oral.sd.KE.Rd index 7a822e5b..32fc2d6f 100644 --- a/man/ff.PK.1.comp.oral.sd.KE.Rd +++ b/man/ff.PK.1.comp.oral.sd.KE.Rd @@ -28,7 +28,7 @@ A list consisting of: This is a structural model function that encodes a model that is one-compartment, oral absorption, single bolus dose, parameterized using KE. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ diff --git a/man/ff.PKPD.1.comp.oral.md.CL.imax.Rd b/man/ff.PKPD.1.comp.oral.md.CL.imax.Rd index 6dc40ad3..63e4553b 100644 --- a/man/ff.PKPD.1.comp.oral.md.CL.imax.Rd +++ b/man/ff.PKPD.1.comp.oral.md.CL.imax.Rd @@ -28,7 +28,7 @@ A list consisting of: \description{ This is a structural model function that encodes the model described above. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ diff --git a/man/ff.PKPD.1.comp.sd.CL.emax.Rd b/man/ff.PKPD.1.comp.sd.CL.emax.Rd index b6f06e47..b11b2103 100644 --- a/man/ff.PKPD.1.comp.sd.CL.emax.Rd +++ b/man/ff.PKPD.1.comp.sd.CL.emax.Rd @@ -27,7 +27,7 @@ A list consisting of: \description{ This is a structural model function that encodes the model described above. The function is suitable for input to the \code{\link{create.poped.database}} function using the - \code{ff_file} argument. + \code{ff_fun} or \code{ff_file} argument. } \examples{ diff --git a/man/plot_model_prediction.Rd b/man/plot_model_prediction.Rd index 6f9e462e..95616fe1 100644 --- a/man/plot_model_prediction.Rd +++ b/man/plot_model_prediction.Rd @@ -143,18 +143,19 @@ sfg <- function(x,a,bpop,b,bocc){ } ## -- Define initial design and design space -poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.prop", - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=0.01, - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70) +poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=0.01, + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70) ## create plot of model without variability plot_model_prediction(poped.db) @@ -228,9 +229,9 @@ feps <- function(model_switch,xt,parameters,epsi,poped.db){ poped.db <- create.poped.database( - ff_fun="ff", - fError_fun="feps", - fg_fun="sfg", + ff_fun=ff, + fError_fun=feps, + fg_fun=sfg, groupsize=20, m=3, bpop=c(V=72.8,KA=0.25,CL=3.75,Favail=0.9, diff --git a/man/poped_optim.Rd b/man/poped_optim.Rd index 49332d9c..fd6c06f1 100644 --- a/man/poped_optim.Rd +++ b/man/poped_optim.Rd @@ -345,22 +345,23 @@ out_3 <- poped_optim(poped.db,opt_a =TRUE, evaluate_fim = F) # optimize distribution of individuals in 3 groups - poped_db_2 <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, - fg_fun=sfg, - fError_fun=feps.add.prop, - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(prop=0.01,add=0.25), - groupsize=32, - m=3, - xt=list(c( 0.5,1,2,6,8),c(36,72,120), - c(10,12,14,16,18,20,22,24)), - minxt=0.01, - maxxt=120, - a=c(DOSE=70), - mina=c(DOSE=0.01), - maxa=c(DOSE=100)) + poped_db_2 <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(prop=0.01,add=0.25), + groupsize=32, + m=3, + xt=list(c( 0.5,1,2,6,8),c(36,72,120), + c(10,12,14,16,18,20,22,24)), + minxt=0.01, + maxxt=120, + a=c(DOSE=70), + mina=c(DOSE=0.01), + maxa=c(DOSE=100)) opt_xt_inds <- poped_optim(poped_db_2, @@ -386,20 +387,21 @@ out_3 <- poped_optim(poped.db,opt_a =TRUE, bpop_vals_ed_ln ## -- Define initial design and design space - poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", - bpop=bpop_vals_ed_ln, - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(0.01,0.25), - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70, - mina=0, - maxa=100) + poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=bpop_vals_ed_ln, + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(0.01,0.25), + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70, + mina=0, + maxa=100) # E_ln(D) optimization using Random search (just a few samples here) diff --git a/man/poped_optimize.Rd b/man/poped_optimize.Rd index 70e4701e..c01c0937 100644 --- a/man/poped_optimize.Rd +++ b/man/poped_optimize.Rd @@ -290,20 +290,21 @@ out_1 <- poped_optimize(poped.db,opt_a=TRUE,opt_xt=TRUE, bpop_vals_ed_ln ## -- Define initial design and design space - poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", - bpop=bpop_vals_ed_ln, - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(0.01,0.25), - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70, - mina=0, - maxa=100) + poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=bpop_vals_ed_ln, + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(0.01,0.25), + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70, + mina=0, + maxa=100) # ED optimization using Random search (just a few samples here) output <- poped_optimize(poped.db,opt_xt=1,opt_a=1,rsit=10,d_switch=0) diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 48ecc485..a35f55bc 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -1,6 +1,6 @@ template: bootstrap: 5 - bootswatch: spacelab + bootswatch: litera #litera #spacelab #flatly diff --git a/tests/testthat/examples_fcn_doc/examples_blockheader.R b/tests/testthat/examples_fcn_doc/examples_blockheader.R index 3de2d9a4..82bfc11e 100644 --- a/tests/testthat/examples_fcn_doc/examples_blockheader.R +++ b/tests/testthat/examples_fcn_doc/examples_blockheader.R @@ -34,9 +34,9 @@ blockheader(name='', docc=poped.db$parameters$docc,sigma=poped.db$parameters$param.pt.val$sigma) -poped.db.1 <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", +poped.db.1 <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), diff --git a/tests/testthat/examples_fcn_doc/examples_create.poped.database.R b/tests/testthat/examples_fcn_doc/examples_create.poped.database.R index c9c4fe99..cbae9602 100644 --- a/tests/testthat/examples_fcn_doc/examples_create.poped.database.R +++ b/tests/testthat/examples_fcn_doc/examples_create.poped.database.R @@ -20,18 +20,19 @@ sfg <- function(x,a,bpop,b,bocc){ } ## -- Define initial design and design space -poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.prop", - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=0.01, - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70) +poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=0.01, + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70) ## evaluate initial design diff --git a/tests/testthat/examples_fcn_doc/examples_ed_laplace_ofv.R b/tests/testthat/examples_fcn_doc/examples_ed_laplace_ofv.R index 2518b6b9..08e9821f 100644 --- a/tests/testthat/examples_fcn_doc/examples_ed_laplace_ofv.R +++ b/tests/testthat/examples_fcn_doc/examples_ed_laplace_ofv.R @@ -32,9 +32,9 @@ bpop_vals_ed_n["Favail",] <- c(0,1,0) bpop_vals_ed_n ## -- Define initial design and design space -poped.db.n <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", +poped.db.n <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=bpop_vals_ed_n, notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), @@ -88,9 +88,9 @@ output$E_ofv bpop_vals_ed_ln ## -- Define initial design and design space - poped.db.ln <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", + poped.db.ln <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, bpop=bpop_vals_ed_ln, notfixed_bpop=c(1,1,1,0), d=c(CL=0.07, V=0.02, KA=0.6), diff --git a/tests/testthat/examples_fcn_doc/examples_plot_model_prediction.R b/tests/testthat/examples_fcn_doc/examples_plot_model_prediction.R index 804a04de..78113fec 100644 --- a/tests/testthat/examples_fcn_doc/examples_plot_model_prediction.R +++ b/tests/testthat/examples_fcn_doc/examples_plot_model_prediction.R @@ -20,18 +20,19 @@ sfg <- function(x,a,bpop,b,bocc){ } ## -- Define initial design and design space -poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.prop", - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=0.01, - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70) +poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=0.01, + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70) ## create plot of model without variability plot_model_prediction(poped.db) @@ -105,9 +106,9 @@ feps <- function(model_switch,xt,parameters,epsi,poped.db){ poped.db <- create.poped.database( - ff_fun="ff", - fError_fun="feps", - fg_fun="sfg", + ff_fun=ff, + fError_fun=feps, + fg_fun=sfg, groupsize=20, m=3, bpop=c(V=72.8,KA=0.25,CL=3.75,Favail=0.9, diff --git a/tests/testthat/examples_fcn_doc/examples_poped_optim.R b/tests/testthat/examples_fcn_doc/examples_poped_optim.R index 931de48b..4f5600e7 100644 --- a/tests/testthat/examples_fcn_doc/examples_poped_optim.R +++ b/tests/testthat/examples_fcn_doc/examples_poped_optim.R @@ -105,22 +105,23 @@ out_3 <- poped_optim(poped.db,opt_a =TRUE, evaluate_fim = F) # optimize distribution of individuals in 3 groups - poped_db_2 <- create.poped.database(ff_fun=ff.PK.1.comp.oral.sd.CL, - fg_fun=sfg, - fError_fun=feps.add.prop, - bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(prop=0.01,add=0.25), - groupsize=32, - m=3, - xt=list(c( 0.5,1,2,6,8),c(36,72,120), - c(10,12,14,16,18,20,22,24)), - minxt=0.01, - maxxt=120, - a=c(DOSE=70), - mina=c(DOSE=0.01), - maxa=c(DOSE=100)) + poped_db_2 <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=c(CL=0.15, V=8, KA=1.0, Favail=1), + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(prop=0.01,add=0.25), + groupsize=32, + m=3, + xt=list(c( 0.5,1,2,6,8),c(36,72,120), + c(10,12,14,16,18,20,22,24)), + minxt=0.01, + maxxt=120, + a=c(DOSE=70), + mina=c(DOSE=0.01), + maxa=c(DOSE=100)) opt_xt_inds <- poped_optim(poped_db_2, @@ -146,20 +147,21 @@ out_3 <- poped_optim(poped.db,opt_a =TRUE, bpop_vals_ed_ln ## -- Define initial design and design space - poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", - bpop=bpop_vals_ed_ln, - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(0.01,0.25), - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70, - mina=0, - maxa=100) + poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=bpop_vals_ed_ln, + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(0.01,0.25), + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70, + mina=0, + maxa=100) # E_ln(D) optimization using Random search (just a few samples here) diff --git a/tests/testthat/examples_fcn_doc/examples_poped_optimize.R b/tests/testthat/examples_fcn_doc/examples_poped_optimize.R index ef46c5e7..8738a585 100644 --- a/tests/testthat/examples_fcn_doc/examples_poped_optimize.R +++ b/tests/testthat/examples_fcn_doc/examples_poped_optimize.R @@ -75,20 +75,21 @@ out_1 <- poped_optimize(poped.db,opt_a=TRUE,opt_xt=TRUE, bpop_vals_ed_ln ## -- Define initial design and design space - poped.db <- create.poped.database(ff_file="ff.PK.1.comp.oral.sd.CL", - fg_file="sfg", - fError_file="feps.add.prop", - bpop=bpop_vals_ed_ln, - notfixed_bpop=c(1,1,1,0), - d=c(CL=0.07, V=0.02, KA=0.6), - sigma=c(0.01,0.25), - groupsize=32, - xt=c( 0.5,1,2,6,24,36,72,120), - minxt=0, - maxxt=120, - a=70, - mina=0, - maxa=100) + poped.db <- create.poped.database( + ff_fun=ff.PK.1.comp.oral.sd.CL, + fg_fun=sfg, + fError_fun=feps.add.prop, + bpop=bpop_vals_ed_ln, + notfixed_bpop=c(1,1,1,0), + d=c(CL=0.07, V=0.02, KA=0.6), + sigma=c(0.01,0.25), + groupsize=32, + xt=c( 0.5,1,2,6,24,36,72,120), + minxt=0, + maxxt=120, + a=70, + mina=0, + maxa=100) # ED optimization using Random search (just a few samples here) output <- poped_optimize(poped.db,opt_xt=1,opt_a=1,rsit=10,d_switch=0)