compute_terminal_taxon_specific_latent_trait_expectation: Compute Terminal Taxon-specific Latent Trait Expectation

View source: R/cavi_latent_traits.R

compute_terminal_taxon_specific_latent_trait_expectationR Documentation

Compute Terminal Taxon-specific Latent Trait Expectation

Description

Computes the expected value of taxon-specific latent traits at terminal nodes of the phylogeny under the approximate posterior distribution for the PLVM.

Usage

compute_terminal_taxon_specific_latent_trait_expectation(
  individual_specific_latent_traits,
  within_taxon_amplitude,
  parent_taxon_latent_trait,
  conditional_expectation_weight,
  conditional_standard_deviation,
  latent_trait_precision,
  perform_checks = TRUE
)

Arguments

individual_specific_latent_traits

An L-dimensional vector of real values. The latent trait values associated with individuals within the taxon.

within_taxon_amplitude

An L-dimensional vector of real values on the interval [0, 1]. The within-taxon variation parameters for each of the L latent traits.

parent_taxon_latent_trait

An L-dimensional vector of real values. The latent trait values associated with the parent taxon.

conditional_expectation_weight

An L-dimensional vector of real values on the interval [0, 1]. The weight of the latent trait values for the parent taxon in the conditional distribution for the taxon-specific latent trait.

conditional_standard_deviation

An L-dimensional vector of real values on the interval [0, 1]. The standard deviation of the taxon-specific latent trait conditional on its parent taxon.

latent_trait_precision

An L-dimensional vector of positive real values. The precision of the taxon-specific latent trait.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

An L-dimensional vector of real values.


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