R: E step

compute_E.simple {PhylogeneticEM} | R Documentation

## E step

### Description

`compute_E.simple` computes the E step in the simple case where the invert matrix Sigma_YY_inv is given

### Usage

    compute_E.simple(phylo, times_shared, distances_phylo, process, 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)), F_moments, Y_data_vec_known, miss = rep(FALSE,
      attr(params_old, "p_dim") * length(phylo$tip.label)), Y_data, U_tree, ...)

### Arguments

`phylo` | Input tree.
`Y_data` | : vector indicating the data at the tips
`sim` | (list) : result of function `simulate`
`Sigma` | : variance-covariance matrix, result of function `compute_variance_covariance`
`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

conditional_law_X (list) : list of conditional statistics : "expectation" : matrix of size p x (ntaxa+nNodes), with ntaxa first columns set to Y_data (tips), and from ntaxa+1 to conditional expectation of the nodes conditioned to the tips E[Z_j|Y] "variances" : array of size p x p x (ntaxa+nNodes) with ntaxa first matrices of zeros (tips) and conditional variance of the nodes conditioned to the tips Var[Z_j|Y] "covariances" : array of size p x p x (ntaxa+nNodes) with ntaxa first matrices of zeros (tips) and conditional covariance of the nodes and their parents conditioned to the tips Cov[Z_j,Z_pa(j)|Y], with NA for the root. "optimal.values" : matrix of size p x ntaxa+nNodes of optimal values beta(t_j)

[Package PhylogeneticEM version 1.1.0 Index]