| freqdep {learnPopGen} | R Documentation |
Numerical analysis of a frequency dependent seletion model
Description
This function performs numerical analysis of a frequency dependent selection model based on Rice (2004; Evolutionary Theory: Mathematical & Conceptual Foundations). The fitnesses of the three genotypes in the model are as follows, where f(XX) denotes the frequency of the XX genotype: w(AA)=1-3*f(Aa)+3*f(aa); w(Aa)=1-s*f(Aa); and w(aa)=1-3*f(Aa)+3*f(AA). As shown in Rice (2004), though entirely deterministic, the model can exhibit chaotic behavior under some values for s.
Usage
freqdep(p0=0.01, s=0, time=100, show="p", pause=0, ...)
Arguments
p0 |
Starting frequency for the A allele. |
s |
Parameter that determines the strength of selection against heterozygotes when they are common. |
time |
Number of generations to run the analysis. |
show |
Various options for plotting. |
pause |
Pause between generations. |
... |
optional arguments. Presently, the only optional argument in |
Value
The function creates one of several possible plots, depending on the value of show.
The use of cobweb plots follows selection.
The function also invisibly returns an object of class "freqdep" containing the frequency of the allele A through time, if this was calculated by the selected method. This can be printed or plotted using the corresponding methods. (See examples.)
Author(s)
Liam Revell liam.revell@umb.edu
See Also
Examples
freqdep(time=100)
freqdep(s=1.5,time=100)
p<-freqdep(s=2,show="cobweb",time=100)
plot(p)