update_precision: Update auxiliary trait precision

View source: R/cavi_updates.R

update_precisionR Documentation

Update auxiliary trait precision

Description

Update the precision associated with each auxiliary trait within the PLVM by optimising the ELBO.

Usage

update_precision(
  precision,
  metadata,
  auxiliary_traits,
  loading_expectation,
  latent_trait_expectation,
  loading_outer_expectation,
  latent_trait_outer_expectation
)

Arguments

precision

A P-dimensional vector of positive real values. The precision with which auxiliary traits are observed.

metadata

A data frame. Contains all the metadata required to map a set of manifest traits to the PLVM auxiliary traits..

auxiliary_traits

An NxD' matrix of real numbers. The auxiliary traits.

loading_expectation

A D'xL matrix of real numbers, The expected loading matrix.

latent_trait_expectation

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

loading_outer_expectation

A LxLxD' array. The expected outer products of the expected loading matrix.

latent_trait_outer_expectation

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

Value

A P-dimensional vector. The precision associated with each auxiliary trait.


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