nominal_inverse_link: Nominal Inverse Link Function

View source: R/cavi_auxiliary_traits.R

nominal_inverse_linkR Documentation

Nominal Inverse Link Function

Description

Map a nominal manifest trait to auxiliary traits.

Usage

nominal_inverse_link(
  y,
  mu,
  n_samples = 1000,
  return_expectation = TRUE,
  random_seed = NULL,
  perform_checks = TRUE
)

Arguments

y

An N-dimensional vector of unordered factors with K levels. A nominal manifest trait.

mu

An N-dimensional vector of real numbers. The expected value of the underlying Gaussian random variable with variance 1.

n_samples

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

return_expectation

Logical. Should manifest variables map to the expected auxiliary variable or to values sampled from the truncated Gaussian distribution.

random_seed

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

perform_checks

Logical. Check if function inputs are specified correctly.

Value

An NxK matrix of real values.


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