fixation_time_approx: Fixation Time in Wright-Fisher Model with selection by Taylor...

View source: R/fixationTime.R

fixation_time_approxR Documentation

Fixation Time in Wright-Fisher Model with selection by Taylor expansion

Description

This function computes the time to fixation for a given initial probability and fixed selection coefficient alpha using a Taylor expansion

Usage

fixation_time_approx(N, alpha, p, k = 100, type = "2")

Arguments

N

Number of alleles in the considered population (population size)

alpha

Selection coefficient

p

Vector or initial probabilities (values between 0 and 1)

k

number of elements in the Taylor expansion

type

Type of approximation to use (1 or 2)

Value

the time to fixation using an approximation by Taylor expansion


vrunge/WrightFisherSelection documentation built on April 25, 2022, 10:34 a.m.