Learn R Programming

updog (version 1.2.0)

obj_for_rho: Objective function when updating a single inbreeding coefficient.

Description

Objective function when updating a single inbreeding coefficient.

Usage

obj_for_rho(rho, mu, sigma2, alpha, log_bb_dense, ploidy)

Arguments

rho

The inbreeding coefficient for the individual.

mu

A vector of posterior means. The jth element is the posterior mean of SNP j for the individual.

sigma2

A vector of posterior variances. The jth element is the posterior variance of SNP j for the individual.

alpha

A vector of allele frequencies. The jth element is the allele frequency for SNP j.

log_bb_dense

A matrix of log posterior densities. The rows index the SNPs and the columns index the dosage.

ploidy

The ploidy of the species.

Value

A double. The objective when updating rho in mupdog.