Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluate_effect

Evaluate a component effect


Description

Calculate latent component effects given some data and the state of the component's internal random variables.

Usage

evaluate_effect_single(...)

evaluate_effect_multi(...)

## S3 method for class 'component'
evaluate_effect_single(component, state, data, A = NULL, ...)

## S3 method for class 'component_list'
evaluate_effect_single(components, state, data, A = NULL, ...)

## S3 method for class 'component'
evaluate_effect_multi(component, state, data, A = NULL, ...)

## S3 method for class 'component_list'
evaluate_effect_multi(components, state, data, A = NULL, ...)

Arguments

...

Unused.

component

A bru_component.

state

Specification of one (for evaluate_effect_single) or several (for evaluate_effect_multi) latent variable states:

  • evaluate_effect_single.component: A vector of the latent component state.

  • evaluate_effect_single.component_list: list of named vectors.

  • evaluate_effect_multi: list of lists of the evaluate_effect_single.component_list type. For evaluate_effect_multi.component, only the label for the given component needs to be included

data

A data.frame or Spatial* object of covariates and/or point locations.

A

A matrix overriding the default projection matrix or matrices (named list of matrices for evaluate_effect.component_list)

Value

  • evaluate_effect_single.component: A numeric vector of the component effect values state.

  • evaluate_effect_single.component_list: A data.frame of evaluated component effect values

  • evaluate_effect_multi.component: A list of numeric vectors of evaluated component effects.

  • evaluate_effect_multi.component_list: A list of data.frames of evaluated component effects, one data.frame for each state

Author(s)

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


inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.