Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stairway

The Stairway Plot


Description

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.

Usage

stairway(x, epoch = NULL, step.min = 1e-6, step.max = 1e-3)
## S3 method for class 'stairway'
plot(x, type = "S", xlab = "Coalescent intervals",
             ylab = expression(Theta), ...)
## S3 method for class 'stairway'
lines(x, type = "S", ...)

Arguments

x

an object of class site.spectrum or of class stairway.

epoch

an optional vector of integers giving the periods of time (or epochs) with distinct THETA.

step.min

a single numeric value giving the smallest step size used during optimization.

step.max

id. for the largest step size (see nlminb).

type

the type of lines.

xlab, ylab

the default labels on the axes.

...

further arguments passed to other methods.

Details

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).

Value

By default, a single numeric value with the null deviance. If epoch is used, a list with the following components:

estimates

the maximum likelihood estimates.

deviance

the deviance of the fitted model.

null.deviance

the deviance of the null model.

LRT

the likelihood-ratio test comparing the null and the fitted models.

AIC

the Akaike information criterion of the fitted model.

Author(s)

Emmanuel Paradis

References

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.

See Also

Examples

data(woodmouse)
sp <- site.spectrum(woodmouse)
stairway(sp, c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2))

pegas

Population and Evolutionary Genetics Analysis System

v1.0
GPL (>= 2)
Authors
Emmanuel Paradis [aut, cre, cph] (<https://orcid.org/0000-0003-3092-2199>), Thibaut Jombart [aut, cph] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cph] (<https://orcid.org/0000-0003-1458-7108>), Brian Knaus [aut, cph] (<https://orcid.org/0000-0003-1665-4343>), Klaus Schliep [aut, cph] (<https://orcid.org/0000-0003-2941-0161>), Alastair Potts [aut, cph] (<https://orcid.org/0000-0003-0919-7279>), David Winter [aut, cph] (<https://orcid.org/0000-0002-6165-0029>)
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.