initialise_loading: Initialis Loading

View source: R/cavi_loading.R

initialise_loadingR Documentation

Initialis Loading

Description

Initialise loadings for a PLVM. Allows for either a random initialisation, which does not depend on the auxiliary traits, or initialises with the first L principle components, which does.

Usage

initialise_loading(
  D_prime,
  L,
  ard_precision,
  loading_prior_correlation,
  loading = NULL,
  method = "random",
  random_seed = NULL,
  auxiliary_traits = NULL,
  perform_checks = TRUE
)

Arguments

D_prime

An integer. The dimension of auxiliary traits traits.

L

An integer. The dimension of latent traits.

ard_precision

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

loading_prior_correlation

A D'xD' correlation matrix. The correlation within loadings under the Gaussian prior.

loading

A D'xL matrix of real values. The initial loading matrix. When non null checks that the loading matrix is of the correct type and size.

method

A string. Either "random" or "pca" indicating the type of initialisation adopted.

random_seed

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

auxiliary_traits

An NxD' matrix of real numbers. The initial matrix of auxiliary traits. Only required when method == "pca"

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A D'xL matrix of real values. The initial loading matrix.


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