get_poisson_log_normal_parameters: Compute log means and variances

View source: R/simulatePhyloPoissonLogNormal.R

get_poisson_log_normal_parametersR Documentation

Compute log means and variances

Description

From the parameters of a negative binomial (count_means and count_dispersions), compute the parameters of a phylogenetic Poisson log-normal with the same expectations and variances.

Usage

get_poisson_log_normal_parameters(
  count_means,
  count_dispersions,
  prop.var.tree
)

Arguments

count_means

a matrix with the number of genes p rows and the number of species n columns. Column names should match the tree taxa names.

count_dispersions

a matrix of size p x n, for each gene and species. Column names should match the tree taxa names.

Value

A list, with:

log_means

the p x n matrix of log-means for Poisson-lognormal simulations.

log_variance_phylo

the p vector of phylogenetic log-variances for Poisson-lognormal simulations.

log_variance_sample

the p x n matrix of environmental log-variances for Poisson-lognormal simulations.


csoneson/compcodeR documentation built on Oct. 25, 2023, 1:28 a.m.