}}
26 |
27 | where the tilde \code{~} replaced the equal sign \code{=} in the definition.
28 | }
29 | \examples{
30 | m <- model() +
31 | input_variable("dose") +
32 | prm_log_normal("emax", 10, 0.3) +
33 | prm_no_var("ed50", 5) +
34 | algebraic(effect~emax*dose/(ed50+dose)) +
35 | obs_additive(~effect)
36 | }
37 |
--------------------------------------------------------------------------------
/man/assemblerr-package.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/assemblerr-package.R
3 | \docType{package}
4 | \name{assemblerr-package}
5 | \alias{assemblerr}
6 | \alias{assemblerr-package}
7 | \title{assemblerr: Assembly of Pharmacometric Models}
8 | \description{
9 | Construct pharmacometric nonlinear mixed effect models by combining predefined model components and automatically generate model code for NONMEM. Models are created by combining parameter and observation models, algebraic relationships, compartments, and flows. Pharmacokinetic models can be assembled from the higher-order components: absorption, distribution, and elimination. The generated code is optimized for performance by recognizing, for example, linear differential equations or differential equations with an analytic solution.
10 | }
11 | \seealso{
12 | Useful links:
13 | \itemize{
14 | \item \url{https://github.com/UUPharmacometrics/assemblerr}
15 | \item Report bugs at \url{https://github.com/UUPharmacometrics/assemblerr/issues}
16 | }
17 |
18 | }
19 | \author{
20 | \strong{Maintainer}: Sebastian Ueckert \email{sebastian.ueckert@gmail.com} (\href{https://orcid.org/0000-0002-3712-0255}{ORCID}) [copyright holder]
21 |
22 | Other contributors:
23 | \itemize{
24 | \item Mats O. Karlsson [scientific advisor]
25 | \item Andrew C. Hooker [scientific advisor]
26 | \item Rikard Nordgren [scientific advisor]
27 | \item Simon Carter [reviewer]
28 | \item Simon Buatois [reviewer]
29 | \item João A. Abrantes [reviewer]
30 | \item F. Hoffmann-La Roche Ltd. [funder]
31 | }
32 |
33 | }
34 | \keyword{internal}
35 |
--------------------------------------------------------------------------------
/man/assemblerr-vctrs.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/assemblerr-package.R
3 | \name{assemblerr-vctrs}
4 | \alias{assemblerr-vctrs}
5 | \title{Internal vctrs methods}
6 | \description{
7 | Internal vctrs methods
8 | }
9 | \keyword{internal}
10 |
--------------------------------------------------------------------------------
/man/assemblerr_options.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/model-options.R
3 | \name{assemblerr_options}
4 | \alias{assemblerr_options}
5 | \title{Options}
6 | \usage{
7 | assemblerr_options(
8 | prm.use_mu_referencing = FALSE,
9 | ode.use_special_advans = TRUE,
10 | ode.use_general_linear_advans = TRUE,
11 | ode.general_nonlinear_advan = "advan13",
12 | ode.general_linear_advan = "advan5",
13 | ode.preferred_trans_routines = c("trans2", "trans4"),
14 | issues.missing_variables = c("fix-warn", "fix", "ignore", "fail")
15 | )
16 | }
17 | \arguments{
18 | \item{prm.use_mu_referencing}{Use mu-referencing?}
19 |
20 | \item{ode.use_special_advans}{Use analytic solution ADVANs?}
21 |
22 | \item{ode.use_general_linear_advans}{Use ADVANs for linear ODEs?}
23 |
24 | \item{ode.general_nonlinear_advan}{ADVAN to be used for non-linear ODEs}
25 |
26 | \item{ode.general_linear_advan}{ADVAN to be used for linear ODEs}
27 |
28 | \item{ode.preferred_trans_routines}{Order of TRANS routines to be tried}
29 |
30 | \item{issues.missing_variables}{How to handle missing variables}
31 | }
32 | \value{
33 | A list of options
34 | }
35 | \description{
36 | This function creates a list of options for the use with the render function.
37 | }
38 | \details{
39 | The function helps to create properly formatted list that can serve as input to the \verb{options=} argument
40 | of the \code{render()} function.
41 | }
42 |
--------------------------------------------------------------------------------
/man/c-IssueList-method.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/issues.R
3 | \name{c,IssueList-method}
4 | \alias{c,IssueList-method}
5 | \title{Combine issues}
6 | \usage{
7 | \S4method{c}{IssueList}(x, ...)
8 | }
9 | \arguments{
10 | \item{x}{An IssueList}
11 |
12 | \item{...}{objects to add to the issue list}
13 | }
14 | \description{
15 | Combine issues
16 | }
17 | \keyword{internal}
18 |
--------------------------------------------------------------------------------
/man/check.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/issues.R
3 | \name{check}
4 | \alias{check}
5 | \title{Checking for issues}
6 | \usage{
7 | check(model)
8 | }
9 | \arguments{
10 | \item{model}{Model to check}
11 | }
12 | \value{
13 | An issue list (printed to the console by default)
14 | }
15 | \description{
16 | This function checks a model for existing issues.
17 | }
18 | \details{
19 | The function accepts a model object and returns a list of issues that can help to identify problems in a model.
20 | If no issues are found, a message and an empty list are produced. Issues can either be critical or non-critical,
21 | depending on whether a valid model could still be rendered.
22 |
23 | The function currently detects the following issues:
24 | \itemize{
25 | \item Undefined variables
26 | \item Lack of parameters
27 | \item Lack of observations
28 | \item Lack of distribution/elimination components (pk_model)
29 | \item Inconsistent capitalization of variable names
30 | }
31 | }
32 | \examples{
33 | m <- model() +
34 | prm_log_normal("emax") +
35 | prm_log_normal("ed50") +
36 | obs_additive(eff~emax*dose/(ed50+dose))
37 | check(m)
38 |
39 | # fix issue
40 | m <- m + input_variable("dose")
41 | check(m)
42 | }
43 |
--------------------------------------------------------------------------------
/man/compartment.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/compartment.R
3 | \name{compartment}
4 | \alias{compartment}
5 | \alias{cmp}
6 | \title{Compartment}
7 | \usage{
8 | compartment(name, volume = 1)
9 |
10 | cmp(name, volume = 1)
11 | }
12 | \arguments{
13 | \item{name}{Name of the compartment}
14 |
15 | \item{volume}{Volume as a number, formula or parameter name}
16 | }
17 | \value{
18 | A building block of type 'compartment'
19 | }
20 | \description{
21 | Defines name and volume of a compartment.
22 | }
23 | \details{
24 | In most applications, compartments contain kinetically homogeneous amount of drug (applications where the compartment
25 | content represents other quantities are also possible). In assemblerr, a compartment is defined by providing a
26 | a name and the compartment volume.
27 | \subsection{Compartment names}{
28 |
29 | Every compartment must have a valid name. A compartment name can contain letters, numbers as well as the underscore character, and
30 | needs to start with a letter. Adding a compartment with an already existing name will replace the definition of the compartment.
31 | }
32 |
33 | \subsection{Compartment volumes}{
34 |
35 | The compartment volume can be provided as a number, R formula, or a parameter name. It will be used by assemblerr to replace
36 | references to the compartment concentration (e.g., \code{~C["central"]}) with the corresponding amount divided by volume (e.g., \verb{~A["central]/vc}).
37 | }
38 | }
39 | \examples{
40 | # model with depot and central compartment
41 | m <- model() +
42 | compartment("depot", volume = 1) +
43 | compartment("central", volume = "vc") +
44 | flow(~ka*A, from = "depot", to = "central") +
45 | flow(~cl*C, from = "central") +
46 | prm_log_normal("ka") +
47 | prm_log_normal("cl") +
48 | prm_log_normal("vc") +
49 | obs_additive(conc~C["central"])
50 |
51 | render(
52 | model = m,
53 | options = assemblerr_options(
54 | ode.use_special_advans = FALSE,
55 | ode.use_general_linear_advans = FALSE
56 | )
57 | )
58 | }
59 | \seealso{
60 | \link{flow} for how to describe compartment kinetics
61 | }
62 |
--------------------------------------------------------------------------------
/man/dcl_add.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration.R
3 | \name{dcl_add}
4 | \alias{dcl_add}
5 | \alias{dcl_substract}
6 | \alias{dcl_multiply}
7 | \alias{dcl_devide}
8 | \title{Arithmetically combine declarations}
9 | \usage{
10 | dcl_add(dcl1, dcl2, lhs = dcl_id(dcl1))
11 |
12 | dcl_substract(dcl1, dcl2, lhs = dcl_id(dcl1))
13 |
14 | dcl_multiply(dcl1, dcl2, lhs = dcl_id(dcl1))
15 |
16 | dcl_devide(dcl1, dcl2, lhs = dcl_id(dcl1))
17 | }
18 | \arguments{
19 | \item{dcl1}{A declaration}
20 |
21 | \item{dcl2}{A declaration}
22 |
23 | \item{lhs}{List of expressions for the left-hand side of the resulting declaration}
24 | }
25 | \value{
26 | A declaration
27 | }
28 | \description{
29 | These functions allow to combine two declarations using addition, substraction, multiplication, or division.
30 | }
31 | \section{Functions}{
32 | \itemize{
33 | \item \code{dcl_add()}: Addition of the declarations
34 |
35 | \item \code{dcl_substract()}: Substraction of the declarations
36 |
37 | \item \code{dcl_multiply()}: Multiplications of the declarations
38 |
39 | \item \code{dcl_devide()}: Division of the declarations
40 |
41 | }}
42 | \keyword{internal}
43 |
--------------------------------------------------------------------------------
/man/dcl_id-set.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration.R
3 | \name{dcl_id<-}
4 | \alias{dcl_id<-}
5 | \title{Set declaration fields}
6 | \usage{
7 | dcl_id(dcl) <- value
8 | }
9 | \arguments{
10 | \item{dcl}{A declaration}
11 |
12 | \item{value}{An expression or a list of expressions}
13 | }
14 | \value{
15 | The modified declaration
16 | }
17 | \description{
18 | Set declaration fields
19 | }
20 | \keyword{internal}
21 |
--------------------------------------------------------------------------------
/man/dcl_id.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration.R
3 | \name{dcl_id}
4 | \alias{dcl_id}
5 | \alias{dcl_def}
6 | \title{Get declaration fields
7 |
8 | These function get identifier or definition fields of a declaration.}
9 | \usage{
10 | dcl_id(dcl)
11 |
12 | dcl_def(dcl)
13 | }
14 | \arguments{
15 | \item{dcl}{A declaration}
16 | }
17 | \value{
18 | An expression
19 | }
20 | \description{
21 | Get declaration fields
22 |
23 | These function get identifier or definition fields of a declaration.
24 | }
25 | \keyword{internal}
26 |
--------------------------------------------------------------------------------
/man/declaration.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration-creation.R
3 | \name{declaration}
4 | \alias{declaration}
5 | \title{Declaration}
6 | \usage{
7 | declaration(...)
8 | }
9 | \arguments{
10 | \item{...}{List of R formulae with a single symbol on the left-hand side and a valid R expression on the right}
11 | }
12 | \value{
13 | A declaration vector
14 | }
15 | \description{
16 | A declaration is the mathematical definition of a set of variables. It is the lowest level building block for a model
17 | in `assemblerr`. A declaration consists of the variable names being declared (the identifiers) and their definition. The
18 | `declaration` function allows the specification of a declaration using `R` formulae.
19 | }
20 | \examples{
21 | d <- declaration(cl~theta[1]+eta[1])
22 | d2 <- declaration(v=theta[2]*exp(eta[2]))
23 | }
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/man/facet_names_to_labels.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/util.R
3 | \name{facet_names_to_labels}
4 | \alias{facet_names_to_labels}
5 | \title{Convert facet class names to labels}
6 | \usage{
7 | facet_names_to_labels(names)
8 | }
9 | \arguments{
10 | \item{names}{Character vector of facet class names}
11 | }
12 | \value{
13 | Character vector with class names translated to labels
14 | }
15 | \description{
16 | Convert facet class names to labels
17 | }
18 | \examples{
19 | assemblerr:::facet_names_to_labels(c("ParameterFacet", "InputVariableFacet"))
20 | }
21 | \keyword{internal}
22 |
--------------------------------------------------------------------------------
/man/figures/README-pressure-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UUPharmacometrics/assemblerr/00f8b410470d12bca39445f7186449c820e18177/man/figures/README-pressure-1.png
--------------------------------------------------------------------------------
/man/flow.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/compartment.R
3 | \name{flow}
4 | \alias{flow}
5 | \title{Flow between compartments}
6 | \usage{
7 | flow(definition, from = NA_character_, to = NA_character_)
8 | }
9 | \arguments{
10 | \item{definition}{Equation describing the flow}
11 |
12 | \item{from}{Name of the source compartment (NA for an inflow without source)}
13 |
14 | \item{to}{Name of the sink compartment (NA for an outflow without sink)}
15 | }
16 | \value{
17 | A building block of type 'flow'
18 | }
19 | \description{
20 | This building block describes a flow between compartments.
21 | }
22 | \details{
23 | Flows define the connections between compartments and the equations according to which exchanges occur.
24 | \subsection{Flow equations}{
25 |
26 | The first function argument is the flow equation. It is defined using R formulas that can start with the tilde \code{~} operator and do not
27 | need to have a left-hand side (i.e., \code{~k0} is a valid flow definition).
28 |
29 | Flow equations can contains the special variables \code{A} and \code{C} which can be used to refer to the amount and concentration in the compartment specified via
30 | the \verb{from=} argument. For example, the following code creates a flow building block describing the first-order transfer from the depot to the central
31 | compartment
32 |
33 | \if{html}{\out{
}}
35 |
36 | When the model is rendered, \code{A} and \code{C} will get replaced with the corresponding compartment reference. assemblerr will raise an error if \code{A} or \code{C} are used
37 | without specifying the \verb{from=} compartment (such as in an inflow).
38 | }
39 |
40 | \subsection{Compartment connections}{
41 |
42 | The connection between compartments can be specified using the \verb{from=} and \verb{to=} arguments of the function. Setting either \verb{from=} or \verb{to=} to \code{NA} allows
43 | the definition of in and outflows without a source or sink. Setting both arguments to \code{NA} results in error.
44 | }
45 |
46 | \subsection{Conversion to differential equations}{
47 |
48 | When flows are rendered they are converted to ordinary differential equations (ODEs). The connection between compartments together with the flow equations allow
49 | assemblerr to determine whether an analytic solution can be generated. This automatic optimization of differential equations can be disabled via the rendering
50 | options.
51 | }
52 | }
53 | \examples{
54 | # one-compartment model with first-order elimination
55 | m <- model() +
56 | prm_log_normal("v") +
57 | prm_log_normal("cl") +
58 | compartment("central", volume = ~v) +
59 | flow(declaration(~cl*C), from = "central") +
60 | obs_additive(~C["central"])
61 | # an analytic solution is generated
62 | render(m)
63 |
64 | # one-compartment model with Michaelis-Menten elimination
65 | m2 <- model() +
66 | prm_log_normal("v") +
67 | prm_log_normal("vmax") +
68 | prm_no_var("km") +
69 | compartment("central", volume = ~v) +
70 | flow(declaration(~vmax*C/(km+C)), from = "central") +
71 | obs_additive(~C["central"])
72 |
73 | # an ODE is generated
74 | render(m2)
75 | }
76 |
--------------------------------------------------------------------------------
/man/input_variables.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/input_variable.R
3 | \name{input_variable}
4 | \alias{input_variable}
5 | \alias{dataset}
6 | \title{Input variables}
7 | \usage{
8 | input_variable(name)
9 |
10 | dataset(path, use_only_filename = FALSE)
11 | }
12 | \arguments{
13 | \item{name}{Variable name}
14 |
15 | \item{path}{Dataset path}
16 |
17 | \item{use_only_filename}{Whether to include the path of the file}
18 | }
19 | \value{
20 | A building block of type 'input_variable'
21 | }
22 | \description{
23 | These building block declare input variables, i.e., variables that are defined in the dataset.
24 | }
25 | \details{
26 | An input variable is defined in the dataset and is declared so that it can be used in the rest of the model definition. The function
27 | \code{input_variable()} declares a single variable whereas the \code{dataset()} function reads the header of the file provided and
28 | declares all variables found.
29 | }
30 | \examples{
31 | m <- model() +
32 | input_variable("dose") +
33 | prm_log_normal("emax") +
34 | prm_log_normal("ed50") +
35 | obs_additive(eff~emax*dose/(ed50+dose))
36 | render(m)
37 | }
38 |
--------------------------------------------------------------------------------
/man/interp.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/util.R
3 | \name{interp}
4 | \alias{interp}
5 | \title{Perform string interpolation with pluralization}
6 | \usage{
7 | interp(..., .envir = parent.frame())
8 | }
9 | \arguments{
10 | \item{...}{Character vectors to interpolate}
11 |
12 | \item{.envir}{Environment for lookup}
13 | }
14 | \value{
15 | A character vector
16 | }
17 | \description{
18 | Perform string interpolation with pluralization
19 | }
20 | \examples{
21 | x <- 1:10
22 | assemblerr:::interp("x has elements {x}")
23 | }
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/man/is_valid_lhs.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration.R
3 | \name{is_valid_lhs}
4 | \alias{is_valid_lhs}
5 | \title{Test if an expression is a valid LHS for a declaration}
6 | \usage{
7 | is_valid_lhs(expr)
8 | }
9 | \arguments{
10 | \item{expr}{an expression}
11 | }
12 | \value{
13 | TRUE/FALSE
14 | }
15 | \description{
16 | Test if an expression is a valid LHS for a declaration
17 | }
18 | \keyword{internal}
19 |
--------------------------------------------------------------------------------
/man/md_doc_links_for_package_functions.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/util.R
3 | \name{md_doc_links_for_package_functions}
4 | \alias{md_doc_links_for_package_functions}
5 | \title{Create documentation links functions}
6 | \usage{
7 | md_doc_links_for_package_functions(pattern)
8 | }
9 | \arguments{
10 | \item{pattern}{Regular expression to select the package functions}
11 | }
12 | \value{
13 | Character vector of length 1
14 | }
15 | \description{
16 | Creates a string with the Markdown code linking to the doc for all function that match the specifed pattern.
17 | }
18 | \examples{
19 | md_doc_links_for_package_functions("^prm_")
20 | }
21 | \keyword{internal}
22 |
--------------------------------------------------------------------------------
/man/model-variable-selection.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/variables.R
3 | \name{model-variable-selection}
4 | \alias{model-variable-selection}
5 | \alias{vars_prms}
6 | \alias{vars_data}
7 | \alias{vars_eta}
8 | \alias{vars_nm_std}
9 | \alias{vars_starts_with}
10 | \alias{vars_matches}
11 | \title{Selecting model variables}
12 | \usage{
13 | vars_prms(vars)
14 |
15 | vars_data(vars)
16 |
17 | vars_eta(vars)
18 |
19 | vars_nm_std(vars)
20 |
21 | vars_starts_with(match, vars)
22 |
23 | vars_matches(match, vars)
24 | }
25 | \arguments{
26 | \item{vars}{A character vector of variable names (taken from the selection context)}
27 |
28 | \item{match}{A character vector to match against}
29 | }
30 | \value{
31 | A selection context
32 | }
33 | \description{
34 | The output task allows to select model variables using
35 | a concise mini language. You can select variables by
36 | name or using one of the helper functions described below.
37 | \subsection{Overview of selection features}{
38 |
39 | The selection of variables builds on the tidyselect package
40 | which implements a powerful variable selection language (see \link[tidyselect:language]{tidyselect::language}).
41 | The following features are most relevant for the
42 | selection of model variables:
43 | \itemize{
44 | \item \code{|} for selecting the union of several variables
45 | \item \code{c()} for combining selections
46 | \item \code{!} for taking the complement of a set of variables
47 | }
48 |
49 | In addition, you can select variables using a combination of the following helper functions:
50 | \itemize{
51 | \item \code{vars_prms()} selects all model parameters
52 | \item \code{vars_data()} selects all data defined variables
53 | \item \code{vars_eta()} selects all eta variables
54 | \item \code{vars_nm_std()} selects the standard NONMEM variables DV, PRED, RES, WRES, IPREDI, IWRESI
55 | \item \code{vars_starts_with()} selects variables that start with a prefix
56 | \item \code{vars_matches()} selects variables that match a regular expression
57 | }
58 | }
59 | }
60 | \examples{
61 |
62 | m <- model() +
63 | input_variable("dose") +
64 | prm_log_normal("emax", median = 10, var_log = 0.09) +
65 | prm_log_normal("ed50", median = 50, var_log = 0.09) +
66 | algebraic(effect~emax*dose/(ed50 + dose)) +
67 | obs_proportional(~effect, var_prop = 1)
68 |
69 | # output all model parameter and eta variables
70 | render(m, tasks = tsk_output("prms", variables = vars_prms() | vars_eta()))
71 | }
72 |
--------------------------------------------------------------------------------
/man/model.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/model.R
3 | \name{model}
4 | \alias{model}
5 | \title{General model}
6 | \usage{
7 | model()
8 | }
9 | \value{
10 | A general pharmacometric model
11 | }
12 | \description{
13 | This function creates the basis for a general pharmacometric model, a flexible but verbose model type.
14 | }
15 | \details{
16 | The function creates the foundation for a general pharmacometric model to which different building blocks can be added. The following building
17 | blocks are relevant for this model type:
18 | \itemize{
19 | \item Parameters: \link{prm_log_normal}, \link{prm_logit_normal}, \link{prm_no_var}, \link{prm_normal}
20 | \item Observations: \link{obs_additive}, \link{obs_combined}, \link{obs_proportional}
21 | \item Algebraic relationships: \link{algebraic}
22 | \item Compartments: \link{compartment}
23 | \item Flows: \link{flow}
24 | \item Input variables: \link{input_variable}, \link{dataset}
25 | }
26 |
27 | The more specialized \code{\link[=pk_model]{pk_model()}} is converted to a general model during the rendering process.
28 | }
29 | \examples{
30 | m <- model() +
31 | input_variable("dose") +
32 | prm_log_normal("emax") +
33 | prm_log_normal("ed50") +
34 | obs_additive(eff~emax*dose/(ed50+dose))
35 | render(m)
36 | }
37 |
--------------------------------------------------------------------------------
/man/names-NamedFacet-method.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/facet.R
3 | \name{names,NamedFacet-method}
4 | \alias{names,NamedFacet-method}
5 | \title{Access facet names}
6 | \usage{
7 | \S4method{names}{NamedFacet}(x)
8 | }
9 | \arguments{
10 | \item{x}{a named facet}
11 | }
12 | \description{
13 | Access facet names
14 | }
15 | \keyword{internal}
16 |
--------------------------------------------------------------------------------
/man/new_declaration.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/declaration-creation.R
3 | \name{new_declaration}
4 | \alias{new_declaration}
5 | \title{`declaration` constructor}
6 | \usage{
7 | new_declaration(identifier = list(), definition = list())
8 | }
9 | \arguments{
10 | \item{identifier}{List of expressions}
11 |
12 | \item{definition}{List of expressions}
13 | }
14 | \value{
15 | An assemblerr_declaration object
16 | }
17 | \description{
18 | The internal constructor for a declaration vector. The user-facing version is `declaration`.
19 | }
20 | \details{
21 | The arguments `identifier` and `definition` are lists of R expressions. For `identifier` only symbols, array expressions
22 | (e.g., theta[1]), or NULL are permitted.
23 | }
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/man/nm_model.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/nm_model.R
3 | \name{nm_model}
4 | \alias{nm_model}
5 | \title{NONMEM model}
6 | \usage{
7 | nm_model()
8 | }
9 | \value{
10 | An nm_model
11 | }
12 | \description{
13 | \code{nm_model()} creates the foundation for a NONMEM model
14 | }
15 | \details{
16 | This function creates a NONMEM model object, a software-specific version of the general
17 | \code{\link{model}}. Like for the general model,this function only creates the empty
18 | base object which then needs to be filled with components before it can be rendered. The
19 | following components can be added
20 | to a NONMEM model:
21 | }
22 | \keyword{internal}
23 |
--------------------------------------------------------------------------------
/man/nm_pk.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/nm_model.R
3 | \name{nm_pk}
4 | \alias{nm_pk}
5 | \title{Create model code entry}
6 | \usage{
7 | nm_pk(statement)
8 | }
9 | \arguments{
10 | \item{statement}{Code statement}
11 | }
12 | \value{
13 | A facet
14 | }
15 | \description{
16 | Create model code entry
17 | }
18 | \keyword{internal}
19 |
--------------------------------------------------------------------------------
/man/nm_theta.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/nm_model.R
3 | \name{nm_theta}
4 | \alias{nm_theta}
5 | \title{Create facet for initial values}
6 | \usage{
7 | nm_theta(name, initial = 1, lbound = -Inf, ubound = Inf)
8 | }
9 | \arguments{
10 | \item{name}{Parameter name}
11 |
12 | \item{initial}{Initial value}
13 |
14 | \item{lbound}{Lower bound}
15 |
16 | \item{ubound}{Upper bound}
17 | }
18 | \value{
19 | A NONMEM Theta parameter
20 | }
21 | \description{
22 | Create facet for initial values
23 | }
24 | \keyword{internal}
25 |
--------------------------------------------------------------------------------
/man/obs_additive.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/observation.R
3 | \name{obs_additive}
4 | \alias{obs_additive}
5 | \title{Observation with additive error}
6 | \usage{
7 | obs_additive(prediction, name, var_add = 1)
8 | }
9 | \arguments{
10 | \item{prediction}{A definition of the model prediction}
11 |
12 | \item{name}{A name for the observation (automatically derived if missing)}
13 |
14 | \item{var_add}{Variance of the additive error}
15 | }
16 | \value{
17 | A building block of type 'observation'
18 | }
19 | \description{
20 | This building block declares an observation model with an additive residual error model (\eqn{y = f + \epsilon_1}).
21 | }
22 | \details{
23 | Observation models specify the observed variable, how an observation is
24 | expected to diverge from the model (i.e, the residual unexplained
25 | variability model), and parameter values. The observation model type is
26 | selected through the function name. The observed variable as well as the
27 | parameters are specified as function arguments.
28 | \subsection{Specifying predictions}{
29 |
30 | The actual prediction from the model is the first argument of the
31 | function. It can be specified in a number of different ways:
32 | \itemize{
33 | \item A name of a variable in the model: \code{obs_additive("effect")}
34 | \item A compartment concentration: \code{obs_additive(~C["central"])}
35 | \item An equation: \code{obs_additive(~base+slp*time)}
36 | }
37 |
38 | If the definition contains a variable name on the left-hand side (as in
39 | \code{conc~C["central"]}), the variable will appear in the generated model
40 | code. This can be useful to make the model code more readable if the
41 | prediction is defined as a long equation.
42 | }
43 |
44 | \subsection{Observation names}{
45 |
46 | The observation name can be specified via the \verb{name=} argument and is
47 | automatically derived if the argument is left empty. Adding an
48 | observation model with an already existing name will replace the
49 | previous definition.
50 | }
51 |
52 | \subsection{Error variance}{
53 |
54 | The variance of the error components are specified via the \verb{var_add=}
55 | and \verb{var_prop=} arguments of the function.
56 | }
57 | }
58 | \examples{
59 | # additve RUV model for observing the variable WT
60 | m <- model() +
61 | prm_log_normal("wt") +
62 | obs_additive(~wt)
63 |
64 | # EMAX dose-response model with proportional RUV
65 | m2 <- model() +
66 | input_variable("dose") +
67 | prm_no_var("emax") +
68 | prm_no_var("ed50") +
69 | obs_proportional(effect~emax*dose/(ed50+dose))
70 | }
71 | \seealso{
72 | Other observation models:
73 | \code{\link{obs_combined}()},
74 | \code{\link{obs_proportional}()}
75 | }
76 | \concept{observation models}
77 |
--------------------------------------------------------------------------------
/man/obs_combined.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/observation.R
3 | \name{obs_combined}
4 | \alias{obs_combined}
5 | \title{Observation with combined error}
6 | \usage{
7 | obs_combined(prediction, name, var_prop = 0.1, var_add = 1)
8 | }
9 | \arguments{
10 | \item{prediction}{A definition of the model prediction}
11 |
12 | \item{name}{A name for the observation (automatically derived if missing)}
13 |
14 | \item{var_prop}{Variance of the proportional error component}
15 |
16 | \item{var_add}{Variance of the additive error component}
17 | }
18 | \value{
19 | A building block of type 'observation'
20 | }
21 | \description{
22 | This building block declares an observation model with a combined residual error model (\eqn{y = f + f \epsilon_1 + \epsilon_2}).
23 | }
24 | \details{
25 | Observation models specify the observed variable, how an observation is
26 | expected to diverge from the model (i.e, the residual unexplained
27 | variability model), and parameter values. The observation model type is
28 | selected through the function name. The observed variable as well as the
29 | parameters are specified as function arguments.
30 | \subsection{Specifying predictions}{
31 |
32 | The actual prediction from the model is the first argument of the
33 | function. It can be specified in a number of different ways:
34 | \itemize{
35 | \item A name of a variable in the model: \code{obs_additive("effect")}
36 | \item A compartment concentration: \code{obs_additive(~C["central"])}
37 | \item An equation: \code{obs_additive(~base+slp*time)}
38 | }
39 |
40 | If the definition contains a variable name on the left-hand side (as in
41 | \code{conc~C["central"]}), the variable will appear in the generated model
42 | code. This can be useful to make the model code more readable if the
43 | prediction is defined as a long equation.
44 | }
45 |
46 | \subsection{Observation names}{
47 |
48 | The observation name can be specified via the \verb{name=} argument and is
49 | automatically derived if the argument is left empty. Adding an
50 | observation model with an already existing name will replace the
51 | previous definition.
52 | }
53 |
54 | \subsection{Error variance}{
55 |
56 | The variance of the error components are specified via the \verb{var_add=}
57 | and \verb{var_prop=} arguments of the function.
58 | }
59 | }
60 | \examples{
61 | # additve RUV model for observing the variable WT
62 | m <- model() +
63 | prm_log_normal("wt") +
64 | obs_additive(~wt)
65 |
66 | # EMAX dose-response model with proportional RUV
67 | m2 <- model() +
68 | input_variable("dose") +
69 | prm_no_var("emax") +
70 | prm_no_var("ed50") +
71 | obs_proportional(effect~emax*dose/(ed50+dose))
72 | }
73 | \seealso{
74 | Other observation models:
75 | \code{\link{obs_additive}()},
76 | \code{\link{obs_proportional}()}
77 | }
78 | \concept{observation models}
79 |
--------------------------------------------------------------------------------
/man/obs_proportional.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/observation.R
3 | \name{obs_proportional}
4 | \alias{obs_proportional}
5 | \title{Observation with proportional error}
6 | \usage{
7 | obs_proportional(prediction, name, var_prop = 0.1)
8 | }
9 | \arguments{
10 | \item{prediction}{A definition of the model prediction}
11 |
12 | \item{name}{A name for the observation (automatically derived if missing)}
13 |
14 | \item{var_prop}{Variance of the proportional error}
15 | }
16 | \value{
17 | A building block of type 'observation'
18 | }
19 | \description{
20 | This building block declares an observation model with a proportional residual error model (\eqn{y = f + f \epsilon_1}).
21 | }
22 | \details{
23 | Observation models specify the observed variable, how an observation is
24 | expected to diverge from the model (i.e, the residual unexplained
25 | variability model), and parameter values. The observation model type is
26 | selected through the function name. The observed variable as well as the
27 | parameters are specified as function arguments.
28 | \subsection{Specifying predictions}{
29 |
30 | The actual prediction from the model is the first argument of the
31 | function. It can be specified in a number of different ways:
32 | \itemize{
33 | \item A name of a variable in the model: \code{obs_additive("effect")}
34 | \item A compartment concentration: \code{obs_additive(~C["central"])}
35 | \item An equation: \code{obs_additive(~base+slp*time)}
36 | }
37 |
38 | If the definition contains a variable name on the left-hand side (as in
39 | \code{conc~C["central"]}), the variable will appear in the generated model
40 | code. This can be useful to make the model code more readable if the
41 | prediction is defined as a long equation.
42 | }
43 |
44 | \subsection{Observation names}{
45 |
46 | The observation name can be specified via the \verb{name=} argument and is
47 | automatically derived if the argument is left empty. Adding an
48 | observation model with an already existing name will replace the
49 | previous definition.
50 | }
51 |
52 | \subsection{Error variance}{
53 |
54 | The variance of the error components are specified via the \verb{var_add=}
55 | and \verb{var_prop=} arguments of the function.
56 | }
57 | }
58 | \examples{
59 | # additve RUV model for observing the variable WT
60 | m <- model() +
61 | prm_log_normal("wt") +
62 | obs_additive(~wt)
63 |
64 | # EMAX dose-response model with proportional RUV
65 | m2 <- model() +
66 | input_variable("dose") +
67 | prm_no_var("emax") +
68 | prm_no_var("ed50") +
69 | obs_proportional(effect~emax*dose/(ed50+dose))
70 | }
71 | \seealso{
72 | Other observation models:
73 | \code{\link{obs_additive}()},
74 | \code{\link{obs_combined}()}
75 | }
76 | \concept{observation models}
77 |
--------------------------------------------------------------------------------
/man/pipe.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/assemblerr-package.R
3 | \name{\%>\%}
4 | \alias{\%>\%}
5 | \title{Pipe operator}
6 | \usage{
7 | lhs \%>\% rhs
8 | }
9 | \description{
10 | See \code{magrittr::\link[magrittr]{\%>\%}} for details.
11 | }
12 | \keyword{internal}
13 |
--------------------------------------------------------------------------------
/man/pk_absorption_fo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_fo}
4 | \alias{pk_absorption_fo}
5 | \title{PK absorption first-order}
6 | \usage{
7 | pk_absorption_fo(prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1))
8 | }
9 | \arguments{
10 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
11 | }
12 | \value{
13 | A building block of type 'pk_component'
14 | }
15 | \description{
16 | This building block declares a first-order absorption component for a pharmacokinetic model.
17 | }
18 | \details{
19 | \subsection{PK components}{
20 |
21 | PK components can be added to a \link{pk_model} and exist in
22 | three different types: absorption, distribution, and elimination. The
23 | absorption component is optional, distribution and elimination are not
24 | and need to be added for the PK model to be valid.
25 |
26 | A PK model can only have one component of each type and adding a
27 | component with an already existing type will replace the previous
28 | definition. For example, the distribution component will be a two
29 | compartment model in the following snippet:
30 |
31 | \if{html}{\out{
}}
39 | }
40 |
41 | \subsection{Parameter models}{
42 |
43 | All PK component functions allow the specification of the parameter
44 | model via their arguments. Arguments that refer to a parameter start
45 | with the prefix \code{prm_}. The default parameter model can be deduced from
46 | the default arguments in the usage section of the help entry. The
47 | parameter name, specified via the \verb{name=} argument of the parameter
48 | model building block allows the renaming of the model parameters.
49 |
50 | For example, the parameter \verb{prm_vc=} refers to the central volume of
51 | distribution parameter in the one compartment distribution PK component
52 | and the default parameter model is a log-normal distribution. The
53 | following code block specifies a normal distribution parameter model and
54 | names the parameter \code{v}:
55 |
56 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
57 | prm_vc = prm_normal("v", mean = 50, var = 25)
58 | )
59 | }\if{html}{\out{
}}
60 | }
61 | }
62 | \seealso{
63 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
64 |
65 | Other absorption components:
66 | \code{\link{pk_absorption_fo_lag}()},
67 | \code{\link{pk_absorption_fo_transit}()},
68 | \code{\link{pk_absorption_fo_zo}()},
69 | \code{\link{pk_absorption_zo_lag}()},
70 | \code{\link{pk_absorption_zo}()}
71 | }
72 | \concept{absorption components}
73 |
--------------------------------------------------------------------------------
/man/pk_absorption_fo_lag.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_fo_lag}
4 | \alias{pk_absorption_fo_lag}
5 | \title{PK absorption first-order, lag-time}
6 | \usage{
7 | pk_absorption_fo_lag(
8 | prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1),
9 | prm_mdt = prm_log_normal("mdt", median = 0.5, var_log = 0.1)
10 | )
11 | }
12 | \arguments{
13 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
14 |
15 | \item{prm_mdt}{Parameter model for the mean delay time (MDT)}
16 | }
17 | \value{
18 | A building block of type 'pk_component'
19 | }
20 | \description{
21 | This building block declares a first-order absorption with lag-time component for a pharmacokinetic model.
22 | }
23 | \details{
24 | \subsection{PK components}{
25 |
26 | PK components can be added to a \link{pk_model} and exist in
27 | three different types: absorption, distribution, and elimination. The
28 | absorption component is optional, distribution and elimination are not
29 | and need to be added for the PK model to be valid.
30 |
31 | A PK model can only have one component of each type and adding a
32 | component with an already existing type will replace the previous
33 | definition. For example, the distribution component will be a two
34 | compartment model in the following snippet:
35 |
36 | \if{html}{\out{
}}
44 | }
45 |
46 | \subsection{Parameter models}{
47 |
48 | All PK component functions allow the specification of the parameter
49 | model via their arguments. Arguments that refer to a parameter start
50 | with the prefix \code{prm_}. The default parameter model can be deduced from
51 | the default arguments in the usage section of the help entry. The
52 | parameter name, specified via the \verb{name=} argument of the parameter
53 | model building block allows the renaming of the model parameters.
54 |
55 | For example, the parameter \verb{prm_vc=} refers to the central volume of
56 | distribution parameter in the one compartment distribution PK component
57 | and the default parameter model is a log-normal distribution. The
58 | following code block specifies a normal distribution parameter model and
59 | names the parameter \code{v}:
60 |
61 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
62 | prm_vc = prm_normal("v", mean = 50, var = 25)
63 | )
64 | }\if{html}{\out{
}}
65 | }
66 | }
67 | \seealso{
68 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
69 |
70 | Other absorption components:
71 | \code{\link{pk_absorption_fo_transit}()},
72 | \code{\link{pk_absorption_fo_zo}()},
73 | \code{\link{pk_absorption_fo}()},
74 | \code{\link{pk_absorption_zo_lag}()},
75 | \code{\link{pk_absorption_zo}()}
76 | }
77 | \concept{absorption components}
78 |
--------------------------------------------------------------------------------
/man/pk_absorption_fo_transit.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_fo_transit}
4 | \alias{pk_absorption_fo_transit}
5 | \title{PK absorption first-order, transit compartment}
6 | \usage{
7 | pk_absorption_fo_transit(
8 | prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1),
9 | transit_compartments = 1L,
10 | prm_mdt = prm_log_normal("mdt", median = 0.5, var_log = 0.1)
11 | )
12 | }
13 | \arguments{
14 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
15 |
16 | \item{transit_compartments}{Number of transit compartments}
17 |
18 | \item{prm_mdt}{Parameter model for the mean delay time (MDT)}
19 | }
20 | \value{
21 | A building block of type 'pk_component'
22 | }
23 | \description{
24 | This building block declares a first-order absorption with transit compartments component for
25 | a pharmacokinetic model.
26 | }
27 | \details{
28 | \subsection{PK components}{
29 |
30 | PK components can be added to a \link{pk_model} and exist in
31 | three different types: absorption, distribution, and elimination. The
32 | absorption component is optional, distribution and elimination are not
33 | and need to be added for the PK model to be valid.
34 |
35 | A PK model can only have one component of each type and adding a
36 | component with an already existing type will replace the previous
37 | definition. For example, the distribution component will be a two
38 | compartment model in the following snippet:
39 |
40 | \if{html}{\out{
}}
48 | }
49 |
50 | \subsection{Parameter models}{
51 |
52 | All PK component functions allow the specification of the parameter
53 | model via their arguments. Arguments that refer to a parameter start
54 | with the prefix \code{prm_}. The default parameter model can be deduced from
55 | the default arguments in the usage section of the help entry. The
56 | parameter name, specified via the \verb{name=} argument of the parameter
57 | model building block allows the renaming of the model parameters.
58 |
59 | For example, the parameter \verb{prm_vc=} refers to the central volume of
60 | distribution parameter in the one compartment distribution PK component
61 | and the default parameter model is a log-normal distribution. The
62 | following code block specifies a normal distribution parameter model and
63 | names the parameter \code{v}:
64 |
65 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
66 | prm_vc = prm_normal("v", mean = 50, var = 25)
67 | )
68 | }\if{html}{\out{
}}
69 | }
70 | }
71 | \seealso{
72 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
73 |
74 | Other absorption components:
75 | \code{\link{pk_absorption_fo_lag}()},
76 | \code{\link{pk_absorption_fo_zo}()},
77 | \code{\link{pk_absorption_fo}()},
78 | \code{\link{pk_absorption_zo_lag}()},
79 | \code{\link{pk_absorption_zo}()}
80 | }
81 | \concept{absorption components}
82 |
--------------------------------------------------------------------------------
/man/pk_absorption_fo_zo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_fo_zo}
4 | \alias{pk_absorption_fo_zo}
5 | \title{PK absorption first-order, zero-order delay}
6 | \usage{
7 | pk_absorption_fo_zo(
8 | prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1),
9 | prm_mdt = prm_log_normal("mdt", median = 0.5, var_log = 0.1)
10 | )
11 | }
12 | \arguments{
13 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
14 |
15 | \item{prm_mdt}{Parameter model for the mean delay time (MDT)}
16 | }
17 | \value{
18 | A building block of type 'pk_component'
19 | }
20 | \description{
21 | This building block declares a first-order absorption with zero-order delay component
22 | for a pharmacokinetic model.
23 | }
24 | \details{
25 | \subsection{PK components}{
26 |
27 | PK components can be added to a \link{pk_model} and exist in
28 | three different types: absorption, distribution, and elimination. The
29 | absorption component is optional, distribution and elimination are not
30 | and need to be added for the PK model to be valid.
31 |
32 | A PK model can only have one component of each type and adding a
33 | component with an already existing type will replace the previous
34 | definition. For example, the distribution component will be a two
35 | compartment model in the following snippet:
36 |
37 | \if{html}{\out{
}}
45 | }
46 |
47 | \subsection{Parameter models}{
48 |
49 | All PK component functions allow the specification of the parameter
50 | model via their arguments. Arguments that refer to a parameter start
51 | with the prefix \code{prm_}. The default parameter model can be deduced from
52 | the default arguments in the usage section of the help entry. The
53 | parameter name, specified via the \verb{name=} argument of the parameter
54 | model building block allows the renaming of the model parameters.
55 |
56 | For example, the parameter \verb{prm_vc=} refers to the central volume of
57 | distribution parameter in the one compartment distribution PK component
58 | and the default parameter model is a log-normal distribution. The
59 | following code block specifies a normal distribution parameter model and
60 | names the parameter \code{v}:
61 |
62 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
63 | prm_vc = prm_normal("v", mean = 50, var = 25)
64 | )
65 | }\if{html}{\out{
}}
66 | }
67 | }
68 | \seealso{
69 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
70 |
71 | Other absorption components:
72 | \code{\link{pk_absorption_fo_lag}()},
73 | \code{\link{pk_absorption_fo_transit}()},
74 | \code{\link{pk_absorption_fo}()},
75 | \code{\link{pk_absorption_zo_lag}()},
76 | \code{\link{pk_absorption_zo}()}
77 | }
78 | \concept{absorption components}
79 |
--------------------------------------------------------------------------------
/man/pk_absorption_zo.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_zo}
4 | \alias{pk_absorption_zo}
5 | \title{PK absorption zero-order}
6 | \usage{
7 | pk_absorption_zo(prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1))
8 | }
9 | \arguments{
10 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
11 | }
12 | \value{
13 | A building block of type 'pk_component'
14 | }
15 | \description{
16 | This building block declares a zero-order absorption component for
17 | a pharmacokinetic model.
18 | }
19 | \details{
20 | \subsection{PK components}{
21 |
22 | PK components can be added to a \link{pk_model} and exist in
23 | three different types: absorption, distribution, and elimination. The
24 | absorption component is optional, distribution and elimination are not
25 | and need to be added for the PK model to be valid.
26 |
27 | A PK model can only have one component of each type and adding a
28 | component with an already existing type will replace the previous
29 | definition. For example, the distribution component will be a two
30 | compartment model in the following snippet:
31 |
32 | \if{html}{\out{
}}
40 | }
41 |
42 | \subsection{Parameter models}{
43 |
44 | All PK component functions allow the specification of the parameter
45 | model via their arguments. Arguments that refer to a parameter start
46 | with the prefix \code{prm_}. The default parameter model can be deduced from
47 | the default arguments in the usage section of the help entry. The
48 | parameter name, specified via the \verb{name=} argument of the parameter
49 | model building block allows the renaming of the model parameters.
50 |
51 | For example, the parameter \verb{prm_vc=} refers to the central volume of
52 | distribution parameter in the one compartment distribution PK component
53 | and the default parameter model is a log-normal distribution. The
54 | following code block specifies a normal distribution parameter model and
55 | names the parameter \code{v}:
56 |
57 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
58 | prm_vc = prm_normal("v", mean = 50, var = 25)
59 | )
60 | }\if{html}{\out{
}}
61 | }
62 | }
63 | \seealso{
64 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
65 |
66 | Other absorption components:
67 | \code{\link{pk_absorption_fo_lag}()},
68 | \code{\link{pk_absorption_fo_transit}()},
69 | \code{\link{pk_absorption_fo_zo}()},
70 | \code{\link{pk_absorption_fo}()},
71 | \code{\link{pk_absorption_zo_lag}()}
72 | }
73 | \concept{absorption components}
74 |
--------------------------------------------------------------------------------
/man/pk_absorption_zo_lag.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_absorption_zo_lag}
4 | \alias{pk_absorption_zo_lag}
5 | \title{PK absorption zero-order, lag-time}
6 | \usage{
7 | pk_absorption_zo_lag(
8 | prm_mat = prm_log_normal("mat", median = 0.5, var_log = 0.1),
9 | prm_mdt = prm_log_normal("mdt", median = 0.5, var_log = 0.1)
10 | )
11 | }
12 | \arguments{
13 | \item{prm_mat}{Parameter model for the mean absorption time (MAT)}
14 |
15 | \item{prm_mdt}{Parameter model for the mean delay time (MDT)}
16 | }
17 | \value{
18 | A building block of type 'pk_component'
19 | }
20 | \description{
21 | This building block declares a zero-order absorption with lag-time component for a pharmacokinetic model.
22 | }
23 | \details{
24 | \subsection{PK components}{
25 |
26 | PK components can be added to a \link{pk_model} and exist in
27 | three different types: absorption, distribution, and elimination. The
28 | absorption component is optional, distribution and elimination are not
29 | and need to be added for the PK model to be valid.
30 |
31 | A PK model can only have one component of each type and adding a
32 | component with an already existing type will replace the previous
33 | definition. For example, the distribution component will be a two
34 | compartment model in the following snippet:
35 |
36 | \if{html}{\out{
}}
44 | }
45 |
46 | \subsection{Parameter models}{
47 |
48 | All PK component functions allow the specification of the parameter
49 | model via their arguments. Arguments that refer to a parameter start
50 | with the prefix \code{prm_}. The default parameter model can be deduced from
51 | the default arguments in the usage section of the help entry. The
52 | parameter name, specified via the \verb{name=} argument of the parameter
53 | model building block allows the renaming of the model parameters.
54 |
55 | For example, the parameter \verb{prm_vc=} refers to the central volume of
56 | distribution parameter in the one compartment distribution PK component
57 | and the default parameter model is a log-normal distribution. The
58 | following code block specifies a normal distribution parameter model and
59 | names the parameter \code{v}:
60 |
61 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
62 | prm_vc = prm_normal("v", mean = 50, var = 25)
63 | )
64 | }\if{html}{\out{
}}
65 | }
66 | }
67 | \seealso{
68 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
69 |
70 | Other absorption components:
71 | \code{\link{pk_absorption_fo_lag}()},
72 | \code{\link{pk_absorption_fo_transit}()},
73 | \code{\link{pk_absorption_fo_zo}()},
74 | \code{\link{pk_absorption_fo}()},
75 | \code{\link{pk_absorption_zo}()}
76 | }
77 | \concept{absorption components}
78 |
--------------------------------------------------------------------------------
/man/pk_distribution_1cmp.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_distribution_1cmp}
4 | \alias{pk_distribution_1cmp}
5 | \title{PK distribution 1 compartment}
6 | \usage{
7 | pk_distribution_1cmp(
8 | prm_vc = prm_log_normal("vc", median = 100, var_log = 0.1)
9 | )
10 | }
11 | \arguments{
12 | \item{prm_vc}{Parameter model for the central volume of distribution}
13 | }
14 | \value{
15 | A building block of type 'pk_component'
16 | }
17 | \description{
18 | This building block declares a one compartment distribution component for a pharmacokinetic model.
19 | }
20 | \details{
21 | \subsection{PK components}{
22 |
23 | PK components can be added to a \link{pk_model} and exist in
24 | three different types: absorption, distribution, and elimination. The
25 | absorption component is optional, distribution and elimination are not
26 | and need to be added for the PK model to be valid.
27 |
28 | A PK model can only have one component of each type and adding a
29 | component with an already existing type will replace the previous
30 | definition. For example, the distribution component will be a two
31 | compartment model in the following snippet:
32 |
33 | \if{html}{\out{
}}
41 | }
42 |
43 | \subsection{Parameter models}{
44 |
45 | All PK component functions allow the specification of the parameter
46 | model via their arguments. Arguments that refer to a parameter start
47 | with the prefix \code{prm_}. The default parameter model can be deduced from
48 | the default arguments in the usage section of the help entry. The
49 | parameter name, specified via the \verb{name=} argument of the parameter
50 | model building block allows the renaming of the model parameters.
51 |
52 | For example, the parameter \verb{prm_vc=} refers to the central volume of
53 | distribution parameter in the one compartment distribution PK component
54 | and the default parameter model is a log-normal distribution. The
55 | following code block specifies a normal distribution parameter model and
56 | names the parameter \code{v}:
57 |
58 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
59 | prm_vc = prm_normal("v", mean = 50, var = 25)
60 | )
61 | }\if{html}{\out{
}}
62 | }
63 | }
64 | \seealso{
65 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
66 |
67 | Other distribution components:
68 | \code{\link{pk_distribution_2cmp}()},
69 | \code{\link{pk_distribution_3cmp}()}
70 | }
71 | \concept{distribution components}
72 |
--------------------------------------------------------------------------------
/man/pk_distribution_2cmp.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_distribution_2cmp}
4 | \alias{pk_distribution_2cmp}
5 | \title{PK distribution 2 compartments}
6 | \usage{
7 | pk_distribution_2cmp(
8 | prm_vc = prm_log_normal("vc", median = 100, var_log = 0.1),
9 | prm_vp = prm_log_normal("vp", median = 5, var_log = 0.1),
10 | prm_q = prm_log_normal("q", median = 50, var_log = 0.1)
11 | )
12 | }
13 | \arguments{
14 | \item{prm_vc}{Parameter model for the central volume of distribution}
15 |
16 | \item{prm_vp}{Parameter model for the peripheral volume of distribution}
17 |
18 | \item{prm_q}{Parameter model for the inter-compartmental clearance}
19 | }
20 | \value{
21 | A building block of type 'pk_component'
22 | }
23 | \description{
24 | This building block declares a two compartment distribution component for a pharmacokinetic model.
25 | }
26 | \details{
27 | \subsection{PK components}{
28 |
29 | PK components can be added to a \link{pk_model} and exist in
30 | three different types: absorption, distribution, and elimination. The
31 | absorption component is optional, distribution and elimination are not
32 | and need to be added for the PK model to be valid.
33 |
34 | A PK model can only have one component of each type and adding a
35 | component with an already existing type will replace the previous
36 | definition. For example, the distribution component will be a two
37 | compartment model in the following snippet:
38 |
39 | \if{html}{\out{
}}
47 | }
48 |
49 | \subsection{Parameter models}{
50 |
51 | All PK component functions allow the specification of the parameter
52 | model via their arguments. Arguments that refer to a parameter start
53 | with the prefix \code{prm_}. The default parameter model can be deduced from
54 | the default arguments in the usage section of the help entry. The
55 | parameter name, specified via the \verb{name=} argument of the parameter
56 | model building block allows the renaming of the model parameters.
57 |
58 | For example, the parameter \verb{prm_vc=} refers to the central volume of
59 | distribution parameter in the one compartment distribution PK component
60 | and the default parameter model is a log-normal distribution. The
61 | following code block specifies a normal distribution parameter model and
62 | names the parameter \code{v}:
63 |
64 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
65 | prm_vc = prm_normal("v", mean = 50, var = 25)
66 | )
67 | }\if{html}{\out{
}}
68 | }
69 | }
70 | \seealso{
71 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
72 |
73 | Other distribution components:
74 | \code{\link{pk_distribution_1cmp}()},
75 | \code{\link{pk_distribution_3cmp}()}
76 | }
77 | \concept{distribution components}
78 |
--------------------------------------------------------------------------------
/man/pk_distribution_3cmp.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_distribution_3cmp}
4 | \alias{pk_distribution_3cmp}
5 | \title{PK distribution 3 compartments}
6 | \usage{
7 | pk_distribution_3cmp(
8 | prm_vc = prm_log_normal("vc", median = 100, var_log = 0.1),
9 | prm_vp1 = prm_log_normal("vp1", median = 5, var_log = 0.1),
10 | prm_vp2 = prm_log_normal("vp2", median = 5, var_log = 0.1),
11 | prm_q1 = prm_log_normal("q1", median = 25, var_log = 0.1),
12 | prm_q2 = prm_log_normal("q2", median = 25, var_log = 0.1)
13 | )
14 | }
15 | \arguments{
16 | \item{prm_vc}{Parameter model for the central volume of distribution}
17 |
18 | \item{prm_vp1}{Parameter model for the volume of the first peripheral compartment}
19 |
20 | \item{prm_vp2}{Parameter model for the volume of the second peripheral compartment}
21 |
22 | \item{prm_q1}{Parameter model for the inter-compartmental clearance between central and first peripheral compartment}
23 |
24 | \item{prm_q2}{Parameter model for the inter-compartmental clearance between central and second peripheral compartment}
25 | }
26 | \value{
27 | A building block of type 'pk_component'
28 | }
29 | \description{
30 | This building block declares a three compartment distribution component for a pharmacokinetic model.
31 | }
32 | \details{
33 | \subsection{PK components}{
34 |
35 | PK components can be added to a \link{pk_model} and exist in
36 | three different types: absorption, distribution, and elimination. The
37 | absorption component is optional, distribution and elimination are not
38 | and need to be added for the PK model to be valid.
39 |
40 | A PK model can only have one component of each type and adding a
41 | component with an already existing type will replace the previous
42 | definition. For example, the distribution component will be a two
43 | compartment model in the following snippet:
44 |
45 | \if{html}{\out{
}}
53 | }
54 |
55 | \subsection{Parameter models}{
56 |
57 | All PK component functions allow the specification of the parameter
58 | model via their arguments. Arguments that refer to a parameter start
59 | with the prefix \code{prm_}. The default parameter model can be deduced from
60 | the default arguments in the usage section of the help entry. The
61 | parameter name, specified via the \verb{name=} argument of the parameter
62 | model building block allows the renaming of the model parameters.
63 |
64 | For example, the parameter \verb{prm_vc=} refers to the central volume of
65 | distribution parameter in the one compartment distribution PK component
66 | and the default parameter model is a log-normal distribution. The
67 | following code block specifies a normal distribution parameter model and
68 | names the parameter \code{v}:
69 |
70 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
71 | prm_vc = prm_normal("v", mean = 50, var = 25)
72 | )
73 | }\if{html}{\out{
}}
74 | }
75 | }
76 | \seealso{
77 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
78 |
79 | Other distribution components:
80 | \code{\link{pk_distribution_1cmp}()},
81 | \code{\link{pk_distribution_2cmp}()}
82 | }
83 | \concept{distribution components}
84 |
--------------------------------------------------------------------------------
/man/pk_elimination_linear.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_elimination_linear}
4 | \alias{pk_elimination_linear}
5 | \title{PK elimination linear}
6 | \usage{
7 | pk_elimination_linear(
8 | prm_cl = prm_log_normal("cl", median = 50, var_log = 0.1)
9 | )
10 | }
11 | \arguments{
12 | \item{prm_cl}{Parameter model for the clearance}
13 | }
14 | \value{
15 | A building block of type 'pk_component'
16 | }
17 | \description{
18 | This building block declares a linear elimination component for a pharmacokinetic model.
19 | }
20 | \details{
21 | \subsection{PK components}{
22 |
23 | PK components can be added to a \link{pk_model} and exist in
24 | three different types: absorption, distribution, and elimination. The
25 | absorption component is optional, distribution and elimination are not
26 | and need to be added for the PK model to be valid.
27 |
28 | A PK model can only have one component of each type and adding a
29 | component with an already existing type will replace the previous
30 | definition. For example, the distribution component will be a two
31 | compartment model in the following snippet:
32 |
33 | \if{html}{\out{
}}
41 | }
42 |
43 | \subsection{Parameter models}{
44 |
45 | All PK component functions allow the specification of the parameter
46 | model via their arguments. Arguments that refer to a parameter start
47 | with the prefix \code{prm_}. The default parameter model can be deduced from
48 | the default arguments in the usage section of the help entry. The
49 | parameter name, specified via the \verb{name=} argument of the parameter
50 | model building block allows the renaming of the model parameters.
51 |
52 | For example, the parameter \verb{prm_vc=} refers to the central volume of
53 | distribution parameter in the one compartment distribution PK component
54 | and the default parameter model is a log-normal distribution. The
55 | following code block specifies a normal distribution parameter model and
56 | names the parameter \code{v}:
57 |
58 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
59 | prm_vc = prm_normal("v", mean = 50, var = 25)
60 | )
61 | }\if{html}{\out{
}}
62 | }
63 | }
64 | \seealso{
65 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
66 |
67 | Other elimination components:
68 | \code{\link{pk_elimination_linear_nl}()},
69 | \code{\link{pk_elimination_nl}()}
70 | }
71 | \concept{elimination components}
72 |
--------------------------------------------------------------------------------
/man/pk_elimination_linear_nl.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_elimination_linear_nl}
4 | \alias{pk_elimination_linear_nl}
5 | \title{PK elimination linear & nonlinear}
6 | \usage{
7 | pk_elimination_linear_nl(
8 | prm_cllin = prm_log_normal("cllin", median = 50, var_log = 0.1),
9 | prm_clmm = prm_log_normal("clmm", median = 25, var_log = 0.1),
10 | prm_km = prm_log_normal("km", median = 0.5, var_log = 0.1),
11 | prm_vmax = NULL
12 | )
13 | }
14 | \arguments{
15 | \item{prm_cllin}{Parameter model for the linear clearance}
16 |
17 | \item{prm_clmm}{Parameter model for the non-linear clearance}
18 |
19 | \item{prm_km}{Parameter model for KM (the half-maximal concentration)}
20 |
21 | \item{prm_vmax}{Parameter model for Vmax (the maximal elimination rate)}
22 | }
23 | \value{
24 | A building block of type 'pk_component'
25 | }
26 | \description{
27 | This building block declares a mixed linear and nonlinear elimination component for a pharmacokinetic model.
28 | }
29 | \details{
30 | \subsection{PK components}{
31 |
32 | PK components can be added to a \link{pk_model} and exist in
33 | three different types: absorption, distribution, and elimination. The
34 | absorption component is optional, distribution and elimination are not
35 | and need to be added for the PK model to be valid.
36 |
37 | A PK model can only have one component of each type and adding a
38 | component with an already existing type will replace the previous
39 | definition. For example, the distribution component will be a two
40 | compartment model in the following snippet:
41 |
42 | \if{html}{\out{
}}
50 | }
51 |
52 | \subsection{Parameter models}{
53 |
54 | All PK component functions allow the specification of the parameter
55 | model via their arguments. Arguments that refer to a parameter start
56 | with the prefix \code{prm_}. The default parameter model can be deduced from
57 | the default arguments in the usage section of the help entry. The
58 | parameter name, specified via the \verb{name=} argument of the parameter
59 | model building block allows the renaming of the model parameters.
60 |
61 | For example, the parameter \verb{prm_vc=} refers to the central volume of
62 | distribution parameter in the one compartment distribution PK component
63 | and the default parameter model is a log-normal distribution. The
64 | following code block specifies a normal distribution parameter model and
65 | names the parameter \code{v}:
66 |
67 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
68 | prm_vc = prm_normal("v", mean = 50, var = 25)
69 | )
70 | }\if{html}{\out{
}}
71 | }
72 | }
73 | \seealso{
74 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
75 |
76 | Other elimination components:
77 | \code{\link{pk_elimination_linear}()},
78 | \code{\link{pk_elimination_nl}()}
79 | }
80 | \concept{elimination components}
81 |
--------------------------------------------------------------------------------
/man/pk_elimination_nl.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_component.R
3 | \name{pk_elimination_nl}
4 | \alias{pk_elimination_nl}
5 | \title{PK elimination nonlinear}
6 | \usage{
7 | pk_elimination_nl(
8 | prm_clmm = prm_log_normal("clmm", median = 25, var_log = 0.1),
9 | prm_km = prm_log_normal("km", median = 0.5, var_log = 0.1),
10 | prm_vmax = NULL
11 | )
12 | }
13 | \arguments{
14 | \item{prm_clmm}{Parameter model for the clearance}
15 |
16 | \item{prm_km}{Parameter model for KM (the half-maximal concentration)}
17 |
18 | \item{prm_vmax}{Parameter model for Vmax (the maximal elimination rate)}
19 | }
20 | \value{
21 | A building block of type 'pk_component'
22 | }
23 | \description{
24 | This building block declares a nonlinear elimination component for a pharmacokinetic model.
25 | }
26 | \details{
27 | \subsection{PK components}{
28 |
29 | PK components can be added to a \link{pk_model} and exist in
30 | three different types: absorption, distribution, and elimination. The
31 | absorption component is optional, distribution and elimination are not
32 | and need to be added for the PK model to be valid.
33 |
34 | A PK model can only have one component of each type and adding a
35 | component with an already existing type will replace the previous
36 | definition. For example, the distribution component will be a two
37 | compartment model in the following snippet:
38 |
39 | \if{html}{\out{
}}
47 | }
48 |
49 | \subsection{Parameter models}{
50 |
51 | All PK component functions allow the specification of the parameter
52 | model via their arguments. Arguments that refer to a parameter start
53 | with the prefix \code{prm_}. The default parameter model can be deduced from
54 | the default arguments in the usage section of the help entry. The
55 | parameter name, specified via the \verb{name=} argument of the parameter
56 | model building block allows the renaming of the model parameters.
57 |
58 | For example, the parameter \verb{prm_vc=} refers to the central volume of
59 | distribution parameter in the one compartment distribution PK component
60 | and the default parameter model is a log-normal distribution. The
61 | following code block specifies a normal distribution parameter model and
62 | names the parameter \code{v}:
63 |
64 | \if{html}{\out{
}}\preformatted{pk_distribution_1cmp(
65 | prm_vc = prm_normal("v", mean = 50, var = 25)
66 | )
67 | }\if{html}{\out{
}}
68 | }
69 | }
70 | \seealso{
71 | \code{\link[=pk_model]{pk_model()}} for the creation of PK models
72 |
73 | Other elimination components:
74 | \code{\link{pk_elimination_linear_nl}()},
75 | \code{\link{pk_elimination_linear}()}
76 | }
77 | \concept{elimination components}
78 |
--------------------------------------------------------------------------------
/man/pk_model.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/pk_model.R
3 | \name{pk_model}
4 | \alias{pk_model}
5 | \title{Create a PK model}
6 | \usage{
7 | pk_model()
8 | }
9 | \value{
10 | A pk_model
11 | }
12 | \description{
13 | This function creates the basis for a pharmacokinetic model.
14 | }
15 | \details{
16 | The function creates the foundation for a pharmacokinetic model to which different building blocks can be added.
17 | The following building blocks are relevant for this model type:
18 | \itemize{
19 | \item Parameters: \link{prm_log_normal}, \link{prm_logit_normal}, \link{prm_no_var}, \link{prm_normal}
20 | \item Observations: \link{obs_additive}, \link{obs_combined}, \link{obs_proportional}
21 | \item Algebraic relationships: \link{algebraic}
22 | \item PK components: \link{pk_absorption_fo}, \link{pk_absorption_fo_lag}, \link{pk_absorption_fo_transit}, \link{pk_absorption_fo_zo}, \link{pk_absorption_zo}, \link{pk_absorption_zo_lag}, \link{pk_distribution_1cmp}, \link{pk_distribution_2cmp}, \link{pk_distribution_3cmp}, \link{pk_elimination_linear}, \link{pk_elimination_linear_nl}, \link{pk_elimination_nl}, \link{pk_model}
23 | \item Input variables: \link{input_variable}, \link{dataset}
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/man/plus-BuildingBlock-BuildingBlock-method.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/facet.R
3 | \name{+,BuildingBlock,BuildingBlock-method}
4 | \alias{+,BuildingBlock,BuildingBlock-method}
5 | \title{Add building blocks}
6 | \usage{
7 | \S4method{+}{BuildingBlock,BuildingBlock}(e1, e2)
8 | }
9 | \arguments{
10 | \item{e1}{A building block}
11 |
12 | \item{e2}{A building block}
13 | }
14 | \description{
15 | Add building blocks
16 | }
17 | \keyword{internal}
18 |
--------------------------------------------------------------------------------
/man/plus-BuildingBlock-NULL-method.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/facet.R
3 | \name{+,BuildingBlock,NULL-method}
4 | \alias{+,BuildingBlock,NULL-method}
5 | \title{Add building blocks}
6 | \usage{
7 | \S4method{+}{BuildingBlock,`NULL`}(e1, e2)
8 | }
9 | \arguments{
10 | \item{e1}{A building block}
11 |
12 | \item{e2}{NULL}
13 | }
14 | \description{
15 | Add building blocks
16 | }
17 | \keyword{internal}
18 |
--------------------------------------------------------------------------------
/man/print_shortened_tree_description.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/description.R
3 | \name{print_shortened_tree_description}
4 | \alias{print_shortened_tree_description}
5 | \title{Print tree description in compact format}
6 | \usage{
7 | print_shortened_tree_description(
8 | tree_description,
9 | type = "building block",
10 | show = "all",
11 | child_type = "entries",
12 | skip_root = TRUE
13 | )
14 | }
15 | \arguments{
16 | \item{tree_description}{A TreeDescription object}
17 |
18 | \item{type}{type label to print to console}
19 |
20 | \item{show}{which child nodes of the root to print or 'all' to print all}
21 |
22 | \item{child_type}{type label for child elements}
23 |
24 | \item{skip_root}{whether the root node should be printed}
25 | }
26 | \value{
27 | The function prints to the console
28 | }
29 | \description{
30 | Print tree description in compact format
31 | }
32 | \keyword{internal}
33 |
--------------------------------------------------------------------------------
/man/prm_log_normal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/parameter.R
3 | \name{prm_log_normal}
4 | \alias{prm_log_normal}
5 | \title{Parameter with log-normal distribution}
6 | \usage{
7 | prm_log_normal(name, median = 1, var_log = 0.1)
8 | }
9 | \arguments{
10 | \item{name}{Parameter name}
11 |
12 | \item{median}{Median (on the normal scale)}
13 |
14 | \item{var_log}{Variance on the log scale}
15 | }
16 | \value{
17 | A building block of type 'parameter'
18 | }
19 | \description{
20 | This building block declares a parameter model for a parameter that follows the normal distribution on the log scale.
21 | }
22 | \details{
23 | Parameter models specify type, name, and values for a parameter. The
24 | parameter model type is selected through the function name. The
25 | parameter name and values are provided as function arguments.
26 | \subsection{Parameter names}{
27 |
28 | Every parameter must have a valid name. A parameter name can contain
29 | letters, numbers as well as the underscore character. The name needs to
30 | start with a letter.
31 |
32 | Adding a parameter with an already existing name will replace the
33 | definition of the parameter. For example, the parameter “base” will have
34 | a log-normal distribution in the following snippet:
35 |
36 | \if{html}{\out{
}}
40 | }
41 |
42 | \subsection{Parameter values}{
43 |
44 | The parameter values that a parameter model expects vary by type. For
45 | example, \code{prm_normal()} requires the mean and the variance, whereas for
46 | \code{prm_log_normal()} median and variance on the log scale need to be
47 | provided. The argument name should indicate what parameter value is
48 | expected.
49 | }
50 |
51 | \subsection{MU-referencing}{
52 |
53 | \code{assemblerr} can include mu-referencing statements for parameter
54 | distributions that support it. The functionality can be activated by
55 | setting the option \code{prm.use_mu_referencing} to \code{TRUE} as shown in the
56 | following snippet:
57 |
58 | \if{html}{\out{
}}
68 | }
69 | }
70 | \examples{
71 | # EMAX dose-response model with emax (log-normal) and ed50 (no variability) parameters
72 | m2 <- model() +
73 | input_variable("dose") +
74 | prm_log_normal("emax", 10, 0.3) +
75 | prm_no_var("ed50", 5) +
76 | obs_proportional(effect~emax*dose/(ed50+dose))
77 |
78 | # a log-normal parameter that is directly observed
79 | m <- model() +
80 | prm_log_normal("wt") +
81 | obs_additive(~wt)
82 |
83 | }
84 | \seealso{
85 | Other parameter models:
86 | \code{\link{prm_logit_normal}()},
87 | \code{\link{prm_no_var}()},
88 | \code{\link{prm_normal}()}
89 | }
90 | \concept{parameter models}
91 |
--------------------------------------------------------------------------------
/man/prm_logit_normal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/parameter.R
3 | \name{prm_logit_normal}
4 | \alias{prm_logit_normal}
5 | \title{Parameter with logit-normal distribution}
6 | \usage{
7 | prm_logit_normal(name, mean_logit = 0, var_logit = 1)
8 | }
9 | \arguments{
10 | \item{name}{Parameter name}
11 |
12 | \item{mean_logit}{Mean on the logit scale}
13 |
14 | \item{var_logit}{Variance on the logit scale}
15 | }
16 | \value{
17 | A building block of type 'parameter'
18 | }
19 | \description{
20 | This building block declares a parameter model for a parameter that follows the normal distribution on the logit-scale.
21 | }
22 | \details{
23 | Parameter models specify type, name, and values for a parameter. The
24 | parameter model type is selected through the function name. The
25 | parameter name and values are provided as function arguments.
26 | \subsection{Parameter names}{
27 |
28 | Every parameter must have a valid name. A parameter name can contain
29 | letters, numbers as well as the underscore character. The name needs to
30 | start with a letter.
31 |
32 | Adding a parameter with an already existing name will replace the
33 | definition of the parameter. For example, the parameter “base” will have
34 | a log-normal distribution in the following snippet:
35 |
36 | \if{html}{\out{
}}
40 | }
41 |
42 | \subsection{Parameter values}{
43 |
44 | The parameter values that a parameter model expects vary by type. For
45 | example, \code{prm_normal()} requires the mean and the variance, whereas for
46 | \code{prm_log_normal()} median and variance on the log scale need to be
47 | provided. The argument name should indicate what parameter value is
48 | expected.
49 | }
50 |
51 | \subsection{MU-referencing}{
52 |
53 | \code{assemblerr} can include mu-referencing statements for parameter
54 | distributions that support it. The functionality can be activated by
55 | setting the option \code{prm.use_mu_referencing} to \code{TRUE} as shown in the
56 | following snippet:
57 |
58 | \if{html}{\out{
}}
68 | }
69 | }
70 | \examples{
71 | # EMAX dose-response model with emax (log-normal) and ed50 (no variability) parameters
72 | m2 <- model() +
73 | input_variable("dose") +
74 | prm_log_normal("emax", 10, 0.3) +
75 | prm_no_var("ed50", 5) +
76 | obs_proportional(effect~emax*dose/(ed50+dose))
77 |
78 | # a log-normal parameter that is directly observed
79 | m <- model() +
80 | prm_log_normal("wt") +
81 | obs_additive(~wt)
82 |
83 | }
84 | \seealso{
85 | Other parameter models:
86 | \code{\link{prm_log_normal}()},
87 | \code{\link{prm_no_var}()},
88 | \code{\link{prm_normal}()}
89 | }
90 | \concept{parameter models}
91 |
--------------------------------------------------------------------------------
/man/prm_no_var.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/parameter.R
3 | \name{prm_no_var}
4 | \alias{prm_no_var}
5 | \title{Parameter without variability}
6 | \usage{
7 | prm_no_var(name, value = 1)
8 | }
9 | \arguments{
10 | \item{name}{Parameter name}
11 |
12 | \item{value}{Parameter value}
13 | }
14 | \value{
15 | A building block of type 'parameter'
16 | }
17 | \description{
18 | This building block declares a parameter model for a parameter that does not vary between subjects.
19 | }
20 | \details{
21 | Parameter models specify type, name, and values for a parameter. The
22 | parameter model type is selected through the function name. The
23 | parameter name and values are provided as function arguments.
24 | \subsection{Parameter names}{
25 |
26 | Every parameter must have a valid name. A parameter name can contain
27 | letters, numbers as well as the underscore character. The name needs to
28 | start with a letter.
29 |
30 | Adding a parameter with an already existing name will replace the
31 | definition of the parameter. For example, the parameter “base” will have
32 | a log-normal distribution in the following snippet:
33 |
34 | \if{html}{\out{
}}
38 | }
39 |
40 | \subsection{Parameter values}{
41 |
42 | The parameter values that a parameter model expects vary by type. For
43 | example, \code{prm_normal()} requires the mean and the variance, whereas for
44 | \code{prm_log_normal()} median and variance on the log scale need to be
45 | provided. The argument name should indicate what parameter value is
46 | expected.
47 | }
48 |
49 | \subsection{MU-referencing}{
50 |
51 | \code{assemblerr} can include mu-referencing statements for parameter
52 | distributions that support it. The functionality can be activated by
53 | setting the option \code{prm.use_mu_referencing} to \code{TRUE} as shown in the
54 | following snippet:
55 |
56 | \if{html}{\out{
}}
66 | }
67 | }
68 | \examples{
69 | # EMAX dose-response model with emax (log-normal) and ed50 (no variability) parameters
70 | m2 <- model() +
71 | input_variable("dose") +
72 | prm_log_normal("emax", 10, 0.3) +
73 | prm_no_var("ed50", 5) +
74 | obs_proportional(effect~emax*dose/(ed50+dose))
75 |
76 | # a log-normal parameter that is directly observed
77 | m <- model() +
78 | prm_log_normal("wt") +
79 | obs_additive(~wt)
80 |
81 | }
82 | \seealso{
83 | Other parameter models:
84 | \code{\link{prm_log_normal}()},
85 | \code{\link{prm_logit_normal}()},
86 | \code{\link{prm_normal}()}
87 | }
88 | \concept{parameter models}
89 |
--------------------------------------------------------------------------------
/man/prm_normal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/parameter.R
3 | \name{prm_normal}
4 | \alias{prm_normal}
5 | \title{Parameter with normal distribution}
6 | \usage{
7 | prm_normal(name, mean = 1, var = 0.1)
8 | }
9 | \arguments{
10 | \item{name}{Parameter name}
11 |
12 | \item{mean}{Mean}
13 |
14 | \item{var}{Variance}
15 | }
16 | \value{
17 | A building block of type 'parameter'
18 | }
19 | \description{
20 | This building block declares a parameter model for a parameter that follows the normal distribution.
21 | }
22 | \details{
23 | Parameter models specify type, name, and values for a parameter. The
24 | parameter model type is selected through the function name. The
25 | parameter name and values are provided as function arguments.
26 | \subsection{Parameter names}{
27 |
28 | Every parameter must have a valid name. A parameter name can contain
29 | letters, numbers as well as the underscore character. The name needs to
30 | start with a letter.
31 |
32 | Adding a parameter with an already existing name will replace the
33 | definition of the parameter. For example, the parameter “base” will have
34 | a log-normal distribution in the following snippet:
35 |
36 | \if{html}{\out{
}}
40 | }
41 |
42 | \subsection{Parameter values}{
43 |
44 | The parameter values that a parameter model expects vary by type. For
45 | example, \code{prm_normal()} requires the mean and the variance, whereas for
46 | \code{prm_log_normal()} median and variance on the log scale need to be
47 | provided. The argument name should indicate what parameter value is
48 | expected.
49 | }
50 |
51 | \subsection{MU-referencing}{
52 |
53 | \code{assemblerr} can include mu-referencing statements for parameter
54 | distributions that support it. The functionality can be activated by
55 | setting the option \code{prm.use_mu_referencing} to \code{TRUE} as shown in the
56 | following snippet:
57 |
58 | \if{html}{\out{
}}
68 | }
69 | }
70 | \examples{
71 | # EMAX dose-response model with emax (log-normal) and ed50 (no variability) parameters
72 | m2 <- model() +
73 | input_variable("dose") +
74 | prm_log_normal("emax", 10, 0.3) +
75 | prm_no_var("ed50", 5) +
76 | obs_proportional(effect~emax*dose/(ed50+dose))
77 |
78 | # a log-normal parameter that is directly observed
79 | m <- model() +
80 | prm_log_normal("wt") +
81 | obs_additive(~wt)
82 |
83 | }
84 | \seealso{
85 | Other parameter models:
86 | \code{\link{prm_log_normal}()},
87 | \code{\link{prm_logit_normal}()},
88 | \code{\link{prm_no_var}()}
89 | }
90 | \concept{parameter models}
91 |
--------------------------------------------------------------------------------
/man/render.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/rendering.R
3 | \name{render}
4 | \alias{render}
5 | \title{Generate model code}
6 | \usage{
7 | render(
8 | model,
9 | filename = NULL,
10 | target_tool = "nonmem",
11 | tasks = tsk_estimation(),
12 | options = assemblerr_options()
13 | )
14 | }
15 | \arguments{
16 | \item{model}{A model object}
17 |
18 | \item{filename}{Name of the model file to create or NULL}
19 |
20 | \item{target_tool}{Name of the target tool (currently only 'nonmem')}
21 |
22 | \item{tasks}{A task specification}
23 |
24 | \item{options}{List of options for model generation}
25 | }
26 | \value{
27 | The model code as a character vector
28 | }
29 | \description{
30 | This function generates the code for a model object, prints it to the console or writes it to a file.
31 | }
32 | \details{
33 | The generated code will be written to the file specified by \verb{filename=} or printed to the console if the filename is
34 | set to \code{NULL}. Only \code{'nonmem'} is currently supported as a \verb{target_tool=} option. The \verb{tasks=} argument allows the
35 | specification of model tasks and the \verb{options=} argument customizes the generated code.
36 | \subsection{Task specification}{
37 |
38 | Tasks are building blocks that allow to specify what a model should "do". Like other model building blocks, they can be combined using the \code{+} operator.
39 | For example, the following adds an estimation task and an xpose4 output task to the generated code:
40 |
41 | \if{html}{\out{
}}
44 |
45 | The default argument (\code{tasks=tsk_estimation()}) adds an FOCE estimation task to the code.
46 | }
47 |
48 | \subsection{Rendering options}{
49 |
50 | The \verb{options=} argument allows to modify the rendering process and, hence, the generated code. Options are provided
51 | as a list and the \code{assemblerr_options()} function helps to generate list with the proper formatting.
52 |
53 | The following code block renders the model \code{m} with automatic mu-referencing for the model parameters
54 |
55 | \if{html}{\out{
}}
57 | }
58 | }
59 | \examples{
60 | m <- model() +
61 | input_variable("dose") +
62 | prm_log_normal("emax") +
63 | prm_log_normal("ed50") +
64 | obs_additive(eff~emax*dose/(ed50+dose))
65 | # render to console
66 | render(m)
67 |
68 | # render to file
69 | \dontrun{
70 | setwd(tempdir())
71 | render(m, "run1.mod")
72 | }
73 |
74 | # render to console with estimation & output task
75 | render(m, tasks = tsk_estimation() + tsk_output_xpose4())
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/man/rmd/observation-model.Rmd:
--------------------------------------------------------------------------------
1 | Observation models specify the observed variable, how an observation is expected to diverge from the model (i.e, the residual unexplained variability model),
2 | and parameter values. The observation model type is selected through the function name. The observed variable as well as the parameters are specified as function
3 | arguments.
4 |
5 | ## Specifying predictions
6 |
7 | The actual prediction from the model is the first argument of the function. It can be specified in a number of different ways:
8 |
9 | - A name of a variable in the model: `obs_additive("effect")`
10 | - A compartment concentration: `obs_additive(~C["central"])`
11 | - An equation: `obs_additive(~base+slp*time)`
12 |
13 | If the definition contains a variable name on the left-hand side (as in `conc~C["central"]`), the variable will appear in the generated model code.
14 | This can be useful to make the model code more readable if the prediction is defined as a long equation.
15 |
16 | ## Observation names
17 |
18 | The observation name can be specified via the `name=` argument and is automatically derived if the argument is left empty. Adding an observation model
19 | with an already existing name will replace the previous definition.
20 |
21 | ## Error variance
22 |
23 | The variance of the error components are specified via the `var_add=` and `var_prop=` arguments of the function.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/man/rmd/parameter-model.Rmd:
--------------------------------------------------------------------------------
1 | Parameter models specify type, name, and values for a parameter. The parameter model type is selected through the function name. The parameter
2 | name and values are provided as function arguments.
3 |
4 | ## Parameter names
5 |
6 | Every parameter must have a valid name. A parameter name can contain letters, numbers as well as the underscore character.
7 | The name needs to start with a letter.
8 |
9 | Adding a parameter with an already existing name will replace the definition of the parameter. For example, the parameter "base"
10 | will have a log-normal distribution in the following snippet:
11 |
12 | ```
13 | m <- model() +
14 | prm_normal("base") +
15 | prm_log_normal("base")
16 | ```
17 |
18 | ## Parameter values
19 |
20 | The parameter values that a parameter model expects vary by type. For example, `prm_normal()` requires the mean and the variance, whereas for `prm_log_normal()`
21 | median and variance on the log scale need to be provided. The argument name should indicate what parameter value is expected.
22 |
23 | ## MU-referencing
24 |
25 | `assemblerr` can include mu-referencing statements for parameter distributions that support it. The functionality can be
26 | activated by setting the option `prm.use_mu_referencing` to `TRUE` as shown in the following snippet:
27 |
28 | ```
29 | m <- model() +
30 | prm_normal("base") +
31 | prm_log_normal("slp") +
32 | obs_additive(response~base+slp*time)
33 |
34 | render(
35 | model = m,
36 | options = assemblerr_options(prm.use_mu_referencing = TRUE)
37 | )
38 | ```
39 |
--------------------------------------------------------------------------------
/man/rmd/pk-component.Rmd:
--------------------------------------------------------------------------------
1 | ## PK components
2 |
3 | PK components can be added to a [pk_model] and exist in three different types: absorption, distribution, and elimination.
4 | The absorption component is optional, distribution and elimination are not and need to be added for the PK model to be valid.
5 |
6 | A PK model can only have one component of each type and adding a component with an already existing type will replace the previous definition. For example, the distribution component will be a two compartment model in the following snippet:
7 |
8 | ```
9 | pkm <- pk_model() +
10 | pk_absorption_fo() +
11 | pk_distribution_1cmp() +
12 | pk_distribution_2cmp() +
13 | pk_elimination_linear() +
14 | obs_additive(conc~C["central"])
15 | pkm
16 | ```
17 |
18 | ## Parameter models
19 |
20 | All PK component functions allow the specification of the parameter model via their arguments. Arguments that refer to a
21 | parameter start with the prefix `prm_`. The default parameter model can be deduced from the default arguments in the usage section of the help entry. The parameter name, specified via the `name=` argument of the parameter model building block allows the renaming of the model parameters.
22 |
23 | For example, the parameter `prm_vc=` refers to the central volume of distribution parameter in the one compartment distribution PK component and the default parameter model is a log-normal distribution. The following code block specifies a normal distribution parameter model and names the parameter `v`:
24 |
25 | ```
26 | pk_distribution_1cmp(
27 | prm_vc = prm_normal("v", mean = 50, var = 25)
28 | )
29 | ```
30 |
--------------------------------------------------------------------------------
/man/rmd/tasks.Rmd:
--------------------------------------------------------------------------------
1 | ## Tasks
2 |
3 | Tasks are building blocks that allow to specify what a model should "do". Like other model building blocks, they can be combined using the `+` operator. However, they should not be added to a model but rather provided via the `tasks=` argument to the render function, e.g.,
4 |
5 | ```r
6 | render(m, tasks = tsk_estimation() +
7 | tsk_output_xpose4())
8 | ```
9 |
--------------------------------------------------------------------------------
/man/transform_ast.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/ast.R
3 | \name{transform_ast}
4 | \alias{transform_ast}
5 | \title{Modify AST}
6 | \usage{
7 | transform_ast(node, transformer, ...)
8 | }
9 | \arguments{
10 | \item{node}{A language node}
11 |
12 | \item{transformer}{A transformer function}
13 |
14 | \item{...}{Additional arguments to the transformer function}
15 | }
16 | \value{
17 | The transformed language node
18 | }
19 | \description{
20 | This recursive function is the work-horse for all expression transformations. It takes a language node and a transformer function,
21 | and applies the transformer recursivly to the node and all its child nodes.
22 | }
23 | \keyword{internal}
24 |
--------------------------------------------------------------------------------
/man/tsk_output.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/tasks.R
3 | \name{tsk_output}
4 | \alias{tsk_output}
5 | \alias{tsk_output_xpose4}
6 | \title{Task output}
7 | \usage{
8 | tsk_output(filename = "sdtab", variables)
9 |
10 | tsk_output_xpose4()
11 | }
12 | \arguments{
13 | \item{filename}{The filename for the output file}
14 |
15 | \item{variables}{The model variables that be included in the output}
16 | }
17 | \value{
18 | A building block of type 'output_task'
19 | }
20 | \description{
21 | These functions define output tasks that include the selected variables in the output of the generated model.
22 | }
23 | \details{
24 | \subsection{Tasks}{
25 |
26 | Tasks are building blocks that allow to specify what a model should
27 | “do”. Like other model building blocks, they can be combined using
28 | the \code{+} operator. However, they should not be added to a model but
29 | rather provided via the \verb{tasks=} argument to the render function, e.g.,
30 |
31 | \if{html}{\out{
}}
34 | }
35 |
36 | \subsection{Output tasks}{
37 |
38 | For NONMEM, an output task defines the \verb{$TABLE} records by specifying the \verb{filename=} as well as the \verb{variables=} to include.
39 |
40 | The variables can be specified by providing a character vector of variable names (e.g., \code{variables = c('cl','v')}) or by
41 | using a set of variable selection helpers (e.g., \code{variables = vars_prms()}). The latter is shorter if many variables are to
42 | be selected and allows the specification of tasks independent from the model. The details of the variable selection language
43 | can be found on the help pages for \link{model-variable-selection}.
44 | }
45 |
46 | \subsection{xpose4 output task}{
47 |
48 | The \code{tsk_output_xpose4()} function includes \verb{$TABLE} records that follow the output conventions of the model diagnostic package xpose4.
49 | It is a shortcut for the following two output tasks:
50 |
51 | \if{html}{\out{