initialise_precision: Initialise Precision

View source: R/cavi_auxiliary_traits.R

initialise_precisionR Documentation

Initialise Precision

Description

Initialise the precision parameters on auxiliary traits within the PLVM.

Usage

initialise_precision(
  n_traits,
  trait_names,
  trait_type,
  precision_prior_shape = 1,
  precision_prior_rate = 0.01,
  precision = NULL,
  perform_checks = TRUE
)

Arguments

n_traits

A natural number. The number of manifest traits.

trait_names

A P-dimensional character vector. The manifest trait names.

trait_type

A P-dimensional vector of unordered factors belonging to one of 4 levels. The trait type corresponding to each of the named manifest traits. Ordinal traits are denoted ord, nominal are nom, scalar-valued continuous are con, and function-valued traits are fvt.

precision_prior_shape

A positive real-valued scalar. The shape of the Gamma prior on the precision.

precision_prior_rate

A positive real-valued scalar. The rate of the Gamma prior on the precision.

precision

A vector length n_traits taking positive real values. The Precision with which auxiliary traits are observed. Precision parameters for discrete traits are fixed at 1. When non-null checks that the precision parameters have been specified correctly.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A vector length n_traits taking positive real values. The Precision with which auxiliary traits are observed. Precision parameters for discrete traits are fixed at 1.


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