model-variable-selection {assemblerr}R Documentation

Selecting model variables

Description

The output task allows to select model variables using a concise mini language. You can select variables by name or using one of the helper functions described below.

Overview of selection features

The selection of variables builds on the tidyselect package which implements a powerful variable selection language (see tidyselect::language). The following features are most relevant for the selection of model variables:

In addition, you can select variables using a combination of the following helper functions:

Usage

vars_prms(vars)

vars_data(vars)

vars_eta(vars)

vars_nm_std(vars)

vars_starts_with(match, vars)

vars_matches(match, vars)

Arguments

vars

A character vector of variable names (taken from the selection context)

match

A character vector to match against

Value

A selection context

Examples


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 all model parameter and eta variables
render(m, tasks = tsk_output("prms", variables = vars_prms() | vars_eta()))

[Package assemblerr version 0.1.0 Index]