nominal_probit_normalising_constant: Nominal Probit Normalising Constant

View source: R/cavi_auxiliary_traits.R

nominal_probit_normalising_constantR Documentation

Nominal Probit Normalising Constant

Description

Computes a Monte Carlo estimate for probability that a K-dimensional multinomial belongs to category i under the probit model given the mean of the underlying Gaussian distribution with variance 1.

Usage

nominal_probit_normalising_constant(
  i,
  mu,
  n_samples = 1000,
  random_seed = NULL,
  log_out = FALSE,
  perform_checks = TRUE
)

Arguments

i

A positive integer. The index identifying the multinomial category.

mu

A K-dimensional vector of real numbers. The expected value of the auxiliary Gaussian mapping to the multinomial.

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.

log_out

Logical. Should the log probability be returned.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A (log) probability scalar.


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