update_discrete_auxiliary_traits: Update Discrete Auxiliary Traits

View source: R/cavi_auxiliary_traits.R

update_discrete_auxiliary_traitsR Documentation

Update Discrete Auxiliary Traits

Description

Update the auxiliary traits corresponding to discrete manifest traits given the CAVI aprroximate posterior over the loading and latent traits in the PLVM.

Usage

update_discrete_auxiliary_traits(
  manifest_trait_df,
  metadata,
  auxiliary_traits,
  loading_expectation,
  latent_trait_expectation,
  n_samples = 1000,
  random_seed = NULL,
  perform_checks = TRUE
)

Arguments

manifest_trait_df

The data frame of manifest traits. If included allows for a non-exhaustive series of checks comparing metadata provided to that implicit in the manifest traits.

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.

n_samples

A positive integer. The number of independent samples drawn to obtain the Monte Carlo estimate.

random_seed

A single value, interpreted as an integer, or NULL.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

An NxD' Matrix of real values. The updated auxiliary traits.


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