create_matrix_l_u | R Documentation |
Outsourced, deep inside the package function to avoid large nesting
create_matrix_l_u(l_u, conds, prm_labels = NULL)
l_u |
either a list or a vector of numeric values |
conds |
a character string, conceptually representing the conditions of a model |
prm_labels |
a character string with parameter labels. Used as a fall back when the default_values are not labeled (see details) |
The goal of this function is to build up a matrix, serving as the upper or
lower end of a parameter space (relevant when simulating data). The function
gets called by get_lower_upper_smart()
.
It assumes the following: l_u
is either a list or a numeric vector.
The easiest case is when it is a numeric vector. In this case, the
function builds a matrix with as many rows as entries in conds
. The
rows will also be labeled according to conds
. The column names are
either the names specified with the numeric vector, or the labels specified
in prm_labels
The less intuitive case is when l_u
is a list. In this case, the list
requires an entry called "default_values" which specifies the named or plain
numeric vector as above. If the list only contains this entry, then the
behavior is as if l_u
was already a numeric vector. However, the l_u
list can also have entries labeled as specific conditions, which contain
named (!) numeric vectors with parameter labels. This will modify the
value for the upper/lower parameter space with respect to the specified
parameters in the respective condition.#'
a matrix indicating either the upper or lower end of a parameter
space. There will be as many rows as conds
implies. The number of columns
depend on l_u
(matching its length if it is a vector, or matching the
length of the entry "default_values" if it is a list).
simulate_data()
, simulate_values()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.