compute_loading_row_precision_list: Compute precision for each row of the Loading Matrix

View source: R/cavi_loading.R

compute_loading_row_precision_listR Documentation

Compute precision for each row of the Loading Matrix

Description

Computes the Gaussian precision associated with each row of the loading matrix under the approximate posterior within Coordinate Ascent Variational Inference (CAVI) for a Phylogenetic Latent Variable Model (PLVM). Stores the resulting D' precision matrices as a list.

Usage

compute_loading_row_precision_list(
  total_individual_specific_latent_trait_outer_product_expectation,
  precision_vector,
  ard_precision,
  scaled_conditional_row_variance_vector,
  perform_checks = TRUE
)

Arguments

total_individual_specific_latent_trait_outer_product_expectation

An LxL matrix of real values. The sum of expected outer products for each of the individual specific latent traits under the approximate posterior within CAVI for the PLVM.

precision_vector

A D'-dimensional vector of positive real values. The precision along each dimension of the auxiliary traits.

ard_precision

An L-dimensional vector of real numbers. The initial ARD precision hyper-parameters on the loadings.

scaled_conditional_row_variance_vector

A D'-dimensional vector of positive real values. The variance of the loading in each row conditioned on the loading at every other row before allowing for the ARD precision hyper-parameter.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A list of length D' containing LxL matrices of real values. The precision associated with each row of the loading matrix under the approximate distribution within CAVI for a PLVM.


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