Description Usage Arguments Details Value See Also Examples
These functions define output tasks that include the selected variables in the output of the generated model.
1 2 3 | tsk_output(filename = "sdtab", variables)
tsk_output_xpose4()
|
filename |
The filename for the output file |
variables |
The model variables that be included in the output |
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.,
render(m, tasks = tsk_estimation() + tsk_output_xpose4())
For NONMEM, an output task defines the $TABLE
records by specifying the filename=
as well as the variables=
to include.
The variables can be specified by providing a character vector of variable names (e.g., variables = c('cl','v')
) or by
using a set of variable selection helpers (e.g., variables = vars_prms()
). The latter is shorter if many variables are to
be selected and allows the specification of tasks independent from the model. The details of the variable selection language
can be found on the help pages for model-variable-selection.
The tsk_output_xpose4()
function includes $TABLE
records that follow the output conventions of the model diagnostic package xpose4.
It is a shortcut for the following two output tasks:
1 2 | xpose4_output <- tsk_output("sdtab", variables = any_of(c("id","time")) | vars_nm_std()) +
tsk_output("patab", variables = vars_prms() | vars_eta())
|
A building block of type 'output_task'
Other tasks:
tsk_estimation()
1 2 3 4 5 6 7 8 9 10 | m <- model() +
input_variable("dose") +
prm_log_normal("emax", median = 10, var_log = 0.09) +
prm_log_normal("ed50", median = 50, var_log = 0.09) +
algebraic(effect~emax*dose/(ed50 + dose)) +
obs_proportional(~effect, var_prop = 1)
# output model parameters to file 'prms'
render(m, tasks = tsk_output("prms", variables = vars_prms()))
# output variables required by xpose4
render(m, tasks = tsk_output_xpose4())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.