tar_nlmixr | R Documentation |
The targets generated will include the name
as the final estimation step,
paste(name, "object_simple", sep = "_tar_")
(e.g.
"pheno_tar_object_simple") as the simplified model object, and
paste(name, "data_simple", sep = "_tar_")
(e.g. "pheno_tar_data_simple") as
the simplified data object.
tar_nlmixr(
name,
object,
data,
est = NULL,
control = list(),
table = nlmixr2est::tableControl(),
env = parent.frame()
)
tar_nlmixr_raw(
name,
object,
data,
est,
control,
table,
object_simple_name,
data_simple_name,
fit_simple_name,
env
)
name |
Symbol, name of the target.
In A target name must be a valid name for a symbol in R, and it
must not start with a dot. Subsequent targets
can refer to this name symbolically to induce a dependency relationship:
e.g. |
object |
Fitted object or function specifying the model. |
data |
nlmixr data |
est |
estimation method (all methods are shown by 'nlmixr2AllEst()'). Methods can be added for other tools |
control |
The estimation control object. These are expected to be different for each type of estimation method |
table |
The output table control object (like 'tableControl()') |
env |
The environment where the model is setup (not needed for typical use) |
object_simple_name , data_simple_name , fit_simple_name |
target names to use for the simplified object, simplified data, fit of the simplified object with the simplified data, and fit with the original data re-inserted. |
For the way that the objects are simplified, see nlmixr_object_simplify()
and nlmixr_data_simplify()
. To see how to write initial conditions to work
with targets, see nlmixr_object_simplify()
.
A list of targets for the model simplification, data simplification, and model estimation.
tar_nlmixr_raw()
: An internal function to generate the targets
## Not run:
library(targets)
targets::tar_script({
pheno <- function() {
ini({
lcl <- log(0.008); label("Typical value of clearance")
lvc <- log(0.6); label("Typical value of volume of distribution")
etalcl + etalvc ~ c(1,
0.01, 1)
cpaddSd <- 0.1; label("residual variability")
})
model({
cl <- exp(lcl + etalcl)
vc <- exp(lvc + etalvc)
kel <- cl/vc
d/dt(central) <- -kel*central
cp <- central/vc
cp ~ add(cpaddSd)
})
}
list(
tar_nlmixr(
name = pheno_model,
object = pheno,
data = nlmixr2data::pheno_sd,
est = "saem"
)
)
})
targets::tar_make()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.