Learn R Programming

PhylogeneticEM (version 1.0.0)

compute_mean_variance.simple: Compute moments of params_old

Description

compute_mean_variance.simple computes the quantities needed to compute mean and variance matrix with parameters params_old.

Usage

compute_mean_variance.simple(phylo, times_shared, distances_phylo, process = c("BM", "OU", "rBM", "scOU"), params_old, masque_data = c(rep(TRUE, attr(params_old, "p_dim") * length(phylo$tip.label)), rep(FALSE, attr(params_old, "p_dim") * phylo$Nnode)), sim = NULL, U_tree = NULL, ...)

Arguments

phylo
Input tree.
times_shared
(matrix) : times of shared ancestry, result of function compute_times_ca
distances_phylo
(matrix) : phylogenetics distance, result of function compute_dist_phy
process
a two letter string indicating the process to consider
params_old
a list of parameters to be used in the computations

Value

sim (list) : result of funtion simulate with the appropriate parametersSigma matrix of variance covariance, result of function compute_variance_covariance #@return Sigma_YY_inv inverse of vairance matrix of the dataSigma_YY_chol_inv invert of cholesky matrix of Sigma_YY: (Sigma_YY)^(-1) = tcrossprod(Sigma_YY_chol_inv)

Details

This function is used by functions compute_E.simple and compute_log_likelihood.simple.