compute_continuous_auxiliary_trait_elbo: Continuous Trait ELBO

View source: R/cavi_auxiliary_traits.R

compute_continuous_auxiliary_trait_elboR Documentation

Continuous Trait ELBO

Description

Compute the contribution of a continuous trait to the Evidence Lower Bound (ELBO) of a PLVM given the approximate posterior distribution for loadings and latent traits

Usage

compute_continuous_auxiliary_trait_elbo(
  auxiliary_trait,
  loading_expectation,
  latent_trait_expectation,
  precision,
  loading_outer_expectation,
  latent_trait_outer_expectation,
  perform_checks = TRUE
)

Arguments

auxiliary_trait

Either an N-dimensional vector or a NxD' matrix of real values. The auxiliary trait measurements associated with a single scalar- or function-valued trait.

loading_expectation

Either a L-dimensional vector or D'xL matrix of real numbers, The row(s) of the expected loading matrix corresponding to the continuous trait.

latent_trait_expectation

An NxL matrix of real values. The expected individual specific latent traits.

precision

A positive real valued scalar. The precision with which the auxiliary trait is observed.

loading_outer_expectation

A LxL matrix or LxLxD' array. The expected outer product(s) for the row(s) of the expected loading matrix corresponding to the continuous trait.

latent_trait_outer_expectation

A LxLxN array. The expected outer product of individual specific latent traits.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A scalar. The contribution to the ELBO made by the continuous trait.


jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.