This function fits a model of population change using the site
frequency spectrum (SFS). The default assumes \(\Theta=1\). A model of population change estimates the temporal changes in
\(\Theta\) with respect to the value of this parameter at
present time. The model is specified by the user with the option
epoch
.
stairway(x, epoch = NULL, step.min = 1e-6, step.max = 1e-3)
# S3 method for stairway
plot(x, type = "S", xlab = "Coalescent intervals",
ylab = expression(Theta), ...)
# S3 method for stairway
lines(x, type = "S", ...)
By default, a single numeric value with the null deviance. If
epoch
is used, a list with the following components:
the maximum likelihood estimates.
the deviance of the fitted model.
the deviance of the null model.
the likelihood-ratio test comparing the null and the fitted models.
the Akaike information criterion of the fitted model.
an object of class site.spectrum
or of class
stairway
.
an optional vector of integers giving the periods of time (or epochs) with distinct \(\Theta\).
a single numeric value giving the smallest step size used during optimization.
id. for the largest step size (see
nlminb
).
the type of lines.
the default labels on the axes.
further arguments passed to other methods.
Emmanuel Paradis
The basic method implemented in this function is similar to Polanski and Kimmel (2003). The temporal model with ``epochs'' is from Liu and Fu (2015).
Liu, X. M. and Fu, Y. X. (2015) Exploring population size changes using SNP frequency spectra. Nature Genetics, 47, 555--559.
Polanski, A. and Kimmel, M. (2003) New explicit expressions for relative frequencies of single-nucleotide polymorphisms with application to statistical inference on population growth. Genetics, 165, 427--436.
site.spectrum
, nlminb
data(woodmouse)
sp <- site.spectrum(woodmouse)
stairway(sp, c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2))
Run the code above in your browser using DataLab