Learn R Programming

updog (version 1.2.0)

compute_all_post_prob: Computes every posterior probability for each dosage level for each individual at each SNP.

Description

Computes every posterior probability for each dosage level for each individual at each SNP.

Usage

compute_all_post_prob(ploidy, mu, sigma2, alpha, rho)

Arguments

ploidy

The ploidy of the species.

mu

A matrix of variational posterior means. The rows index the individuals and the columns index the SNPs.

sigma2

A matrix of variational posterior variances. The rows index the individuals and the columns index the SNPs.

alpha

A vector of allele frequencies for all SNPs.

rho

A vector of inbreeding coefficients for all individuals.

Value

An array. The rows index the individuals, the columns index the SNPS, and the third dimension indexes the genotypes. Element (i, j, k) is the return of post_prob.