Learn R Programming

inlabru (version 2.11.1)

component_list: Methods for inlabru component lists

Description

Constructor methods for inlabru component lists. Syntax details are given in component().

Usage

component_list(object, lhoods = NULL, .envir = parent.frame(), ...)

# S3 method for formula component_list(object, lhoods = NULL, .envir = parent.frame(), ...)

# S3 method for list component_list(object, lhoods = NULL, .envir = parent.frame(), ...)

# S3 method for component_list c(...)

# S3 method for component c(...)

# S3 method for component_list [(x, i)

Arguments

object

The object to operate on

lhoods

A bru_like_list object

.envir

An evaluation environment for non-formula input

...

Parameters passed on to other methods. Also see Details.

x

component_list object from which to extract a sub-list

i

indices specifying elements to extract

Author

Fabian E. Bachl bachlfab@gmail.com and Finn Lindgren finn.lindgren@gmail.com

Details

  • component_list.formula: Convert a component formula into a component_list object

  • 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. The environment from the first argument will be applied to the resulting ``component_list`.

See Also

Other component constructors: component()

Other component constructors: component()

Examples

Run this code
# 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 <- component_list(~ myLinearEffectOfX(main = x, model = "linear"))
summary(eff[[1]])
# Equivalent shortcuts:
eff <- component_list(~ myLinearEffectOfX(x, model = "linear"))
eff <- component_list(~ myLinearEffectOfX(x))
# Individual component
eff <- component("myLinearEffectOfX", main = x, model = "linear")

Run the code above in your browser using DataLab