compute_mahalanobis_distance.simple: Squared Mahalanobis Distance

View source: R/E_step.R

compute_mahalanobis_distance.simpleR Documentation

Squared Mahalanobis Distance

Description

compute_mahalanobis_distance.simple computes the squared Mahalanobis distance between the data and mean at tips of the data in the simple case where the inverse of the variance matrix is given.

Usage

compute_mahalanobis_distance.simple(
  phylo,
  Y_data_vec,
  sim,
  Sigma_YY_chol_inv,
  miss = rep(FALSE, dim(sim)[1] * length(phylo$tip.label)),
  ...
)

Arguments

phylo

Input tree.

Y_data_vec

: vector indicating the data at the tips.

sim

(list) : result of function simulate.

Sigma_YY_chol_inv

: invert of the cholesky variance-covariance matrix of the data.

Details

This function takes parameters sim and Sigma_YY_inv from compute_mean_variance.simple. It uses function extract_simulate_internal to extract the needed quantities from these objects.

Value

squared Mahalanobis distance between data and mean at the tips.


pbastide/PhylogeneticEM documentation built on Feb. 12, 2024, 1:27 a.m.