compute_internal_taxon_specific_latent_trait_expectation: Compute Internal Taxon-specific Latent Trait Expectation

View source: R/cavi_latent_traits.R

compute_internal_taxon_specific_latent_trait_expectationR Documentation

Compute Internal Taxon-specific Latent Trait Expectation

Description

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

Usage

compute_internal_taxon_specific_latent_trait_expectation(
  child_taxa_latent_traits,
  child_taxa_conditional_expectation_weights,
  child_taxa_conditional_standard_deviations,
  parent_taxon_latent_trait,
  conditional_expectation_weight,
  conditional_standard_deviation,
  latent_trait_precision,
  perform_checks = TRUE
)

Arguments

child_taxa_latent_traits

An L-dimensional vector of real values. The latent trait values associated with child taxa.

child_taxa_conditional_expectation_weights

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

child_taxa_conditional_standard_deviations

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

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.