compute_loading_row_precision: Compute precision for a row of the Loading Matrix

View source: R/cavi_loading.R

compute_loading_row_precisionR Documentation

Compute precision for a row of the Loading Matrix

Description

Computes the Gaussian precision associated with a row of the loading matrix under the approximate posterior within Coordinate Ascent Variational Inference (CAVI) for a Phylogenetic Latent Variable Model (PLVM).

Usage

compute_loading_row_precision(
  total_individual_specific_latent_trait_outer_product_expectation,
  precision,
  ard_precision,
  scaled_conditional_row_variance,
  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

A vector length n_traits taking positive real values. The Precision with which auxiliary traits are observed. Precision parameters for discrete traits are fixed at 1.

ard_precision

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

scaled_conditional_row_variance

A positive real-valued scalar. The variance of the loading in the 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

An LxL matrix of real values. The precision associated with a 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.