bru_component_list | R Documentation |
Constructor methods for inlabru component lists. Syntax details are given in
bru_component()
.
bru_component_list(object, lhoods = NULL, .envir = parent.frame(), ...)
## S3 method for class 'formula'
bru_component_list(object, lhoods = NULL, .envir = parent.frame(), ...)
## S3 method for class 'list'
bru_component_list(object, lhoods = NULL, .envir = parent.frame(), ...)
## S3 method for class 'component_list'
c(...)
## S3 method for class 'component'
c(...)
## S3 method for class 'component_list'
x[i]
object |
The object to operate on |
lhoods |
A |
.envir |
An evaluation environment for non-formula input |
... |
Parameters passed on to other methods. Also see Details. |
x |
|
i |
indices specifying elements to extract |
bru_component_list(formula)
: Convert a component formula
into a component_list
object
bru_component_list(list)
: Combine a list of components and/or component
formulas into a component_list
object
c(component_list)
: The ...
arguments should be component_list
objects. The environment from the first argument will be applied to the
resulting component_list
.
c(component)
: The ...
arguments should be component
objects from bru_component()
. The environment from the first argument
will be applied to the resulting “component_list'.
Fabian E. Bachl bachlfab@gmail.com and Finn Lindgren finn.lindgren@gmail.com
Other component constructors:
bru_component()
Other component constructors:
bru_component()
# As an example, let us create a linear component. Here, the component is
# called "myLinearEffectOfX" while the covariate the component acts on is
# called "x". Note that a list of components is returned because the
# formula may define multiple components
eff <- bru_component_list(~ myLinearEffectOfX(main = x, model = "linear"))
summary(eff[[1]])
# Equivalent shortcuts:
eff <- bru_component_list(~ myLinearEffectOfX(x, model = "linear"))
eff <- bru_component_list(~ myLinearEffectOfX(x))
# Individual component
eff <- bru_component("myLinearEffectOfX", main = x, model = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.