ordinal_trait_cut_off_objective: Objective function for the ordinal trait cut off point

View source: R/cavi_updates.R

ordinal_trait_cut_off_objectiveR Documentation

Objective function for the ordinal trait cut off point

Description

Update an ordinal trait cut off point by minimising the negative ELBO associated with the ordinal auxiliary trait.

Usage

ordinal_trait_cut_off_objective(
  par,
  i,
  y,
  cut_off_points,
  loading_expectation,
  latent_trait_expectation,
  loading_outer_expectation,
  latent_trait_outer_expectation,
  perform_checks = TRUE
)

Arguments

par

A real valued scalar. The cut off point of interest

i

An integer value between 3 and K. The index for the cut off point to be optimised.

y

An N-dimensional vector of ordered factors with K levels. An ordinal manifest trait.

cut_off_points

A K+1 dimensional ordered vector of values. The cut off points separating auxiliary traits into ordinal state.

loading_expectation

A L-dimensional vector of real numbers, The row of the expected loading matrix corresponding to the ordinal trait.

latent_trait_expectation

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

loading_outer_expectation

A LxL matrix. The expected outer product for the row of the expected loading matrix corresponding to the ordinal 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 real valued scalar. The negative ELBO associated with the ordinal auxiliary trait.


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