View source: R/ancestral_reconstruction.R
variational_ancestral_reconstruction | R Documentation |
Reconstruct an ancestral trait distribution under the PLVM. Reconstructs the ancestral traits at a specific node on the phylogeny.
variational_ancestral_reconstruction( taxon_specific_latent_trait_expectation, taxon_specific_latent_trait_covariance, loading_expectation, precision_vector, metadata, n_samples = 1000, probs = c(0.025, 0.975), perform_checks = TRUE )
taxon_specific_latent_trait_expectation |
An L-dimensional vector of real values. The expected value of taxon-specific latent traits under the variational distribution. |
taxon_specific_latent_trait_covariance |
An L-dimensional vector of positive real values. The variance associated with each taxon-specific latent trait under the variational distribution. |
loading_expectation |
A D x L matrix of real values. The expected value of the Loading matrix under the vaiational distribution. |
precision_vector |
A D dimensional vector of positive real values. The independent precision associated with each auxiliary trait. |
metadata |
A data frame. Contains all the metadata required to map a set of manifest traits to the PLVM auxiliary traits.. |
n_samples |
A positive integer. The number of samples drawn to construct a Monte-Carlo approximation to the approximate posterior distribution of nominal traits. |
probs |
A numeric vector of values on the unit interval. The desired quantiles for continuous manifest traits. |
perform_checks |
Logical. Check if function inputs are specified correctly. |
A named list of length P. For continuous- or function-valued manifest traits, returns the expectation and marginal standard deviation for each element of the trait. For ordinal or nomianl traits, returns the probability associated with each category.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.