findStationary: Find the stationary frequency distribution

View source: R/model_properties.R

findStationaryR Documentation

Find the stationary frequency distribution

Description

Finds the stationary distribution of allele frequencies, if it exists, w.r.t. a given mutation matrix.

Usage

findStationary(mutmat)

Arguments

mutmat

A mutation matrix.

Value

A vector of length ncol(mutmat), or NULL.

Examples


m1 = mutationMatrix("equal", alleles = 1:4, rate = 0.1)
findStationary(m1)

m2 = mutationMatrix("random", alleles = 1:3, seed = 123)
a = findStationary(m2)

a %*% m2 - a  # check


magnusdv/pedmut documentation built on Jan. 31, 2024, 7:06 a.m.