compute_log_likelihood.simple: Log Likelihood

View source: R/E_step.R

compute_log_likelihood.simpleR Documentation

Log Likelihood

Description

compute_log_likelihood.simple computes the log-likelihood of the data in the simple case where the inverse of the variance matrix is given.

Usage

compute_log_likelihood.simple(
  phylo,
  Y_data_vec,
  sim,
  Sigma,
  Sigma_YY_chol_inv,
  miss = rep(FALSE, dim(sim)[1] * length(phylo$tip.label)),
  masque_data = c(rep(TRUE, dim(sim)[1] * length(phylo$tip.label)), rep(FALSE,
    dim(sim)[1] * phylo$Nnode)),
  ...
)

Arguments

phylo

Input tree.

sim

(list) : result of function simulate

Sigma

: variance-covariance matrix, result of function compute_variance_covariance

Y_data

: vector indicating the data at the tips

Sigma_YY_inv

: invert of the variance-covariance matrix of the data

Details

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

Value

log likelihood of the data


PhylogeneticEM documentation built on Aug. 31, 2022, 9:16 a.m.