bru_used | R Documentation |
Create or extract information about which components are used by a model, or
its individual observation models. If a non-NULL labels
argument is
supplied, also calls bru_used_update()
on the bru_used
objects.
bru_used(x = NULL, ...)
## S3 method for class ''NULL''
bru_used(
x = NULL,
...,
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL
)
## S3 method for class 'character'
bru_used(
x,
...,
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL
)
## S3 method for class 'expression'
bru_used(
x,
...,
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL
)
## S3 method for class 'formula'
bru_used(
x,
...,
effect = NULL,
effect_exclude = NULL,
latent = NULL,
labels = NULL
)
## S3 method for class 'bru'
bru_used(x, ..., join = TRUE)
## S3 method for class 'list'
bru_used(x, ..., join = TRUE)
## S3 method for class 'bru_like'
bru_used(x, ...)
## S3 method for class 'bru_used'
bru_used(x, labels = NULL, ...)
## S3 method for class 'bru_used'
format(x, ...)
## S3 method for class 'bru_used'
summary(object, ...)
## S3 method for class 'bru_used'
print(x, ...)
x |
An object that contains information about used components |
... |
Parameters passed on to the other methods |
effect |
character; components used as effects. When |
effect_exclude |
character; components to specifically exclude from
effect evaluation. When |
latent |
character; components used as |
labels |
character; component labels passed on to
|
join |
Whether to join list output into a single object; Default may depend on the input object class |
The arguments effect
, effect_exclude
, and latent
control what
components and effects are available for use in predictor expressions.
effect
Character vector of component labels that are used as effects
by the predictor expression; If NULL
(default), the names
are extracted from the formula.
exclude
Character vector of component labels to be excluded from the effect list
even if they have been auto-detected as being necessary.
Default is NULL
; do not remove any components from the inclusion list.
include_latent
Character vector.
Specifies which latent state variables need to be directly available to the
predictor expression, with a _latent
suffix. This also makes evaluator
functions with suffix _eval
available, taking parameters main
, group
,
and replicate
, taking values for where to evaluate the component effect
that are different than those defined in the component definition itself
(see bru_component_eval()
). If NULL
, the use of _latent
and _eval
in the predictor expression is detected automatically.
A bru_used
object (a list with elements effect
and latent
), or a list of such objects
(for methods with join = FALSE
)
bru_used(`NULL`)
: Create a bru_used
object from effect name character
vectors.
bru_used(character)
: Create a bru_used
object from a character
representation of an expression.
bru_used(expression)
: Create a bru_used
object from an expression object.
bru_used(formula)
: Create a bru_used
object from a formula (only the
right-hand side is used).
bru_used(bru)
: Extract the bru_used
information for the collection
of observation models used in a bru
object.
bru_used(list)
: Extract the bru_used
information for each element
of a list, and optionally join into a single bru_used
object.
bru_used(bru_like)
: Extract the bru_used
information for the collection
of observation models used in a bru
observation model bru_like
object.
bru_used(bru_used)
: Convenience method that takes
an existing bru_used
object and calls bru_used_update()
if labels
is non-NULL.
format(bru_used)
: Text formatting method for bru_used
objects.
summary(bru_used)
: Summary method for bru_used
objects.
print(bru_used)
: Print method for bru_used
objects.
Other bru_used:
bru_used_update()
,
bru_used_vars()
(used <- bru_used(~.))
bru_used(used, labels = c("a", "c"))
(used <- bru_used(~ a + b + c_latent + d_latent))
bru_used(used, labels = c("a", "c"))
(used <- bru_used(expression(a + b + c_latent + d_latent)))
bru_used(used, labels = c("a", "c"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.