Description Usage Arguments Value Author(s) References See Also Examples
This function takes individual or population data for multiple genetic loci and fits genomic clines. This implementation assumes markers are diagnostic.
1 2 3 |
Data |
Data matrix of allele counts (allele diagnostic for one species desgnated 1, all others 0) by individual or sample (rows) and marker (columns). |
By |
Optional factor defining aggregation of individuals into samples (e.g., sites or populations). Length must be equal to the number of rows in |
S |
Optional alternative values for the genome wide hybrid index. By default, the mean ancestry across all loci in |
model |
Character vector specifying which models to fit. Valid choices are "multinom","binom","logit.logistic","Barton","Beta", and "Richards". |
Start |
Optional starting values for optimization. If |
Methods |
Optional named list of strings indicating the optimization method for each cline model (logit-logistic, Barton, Beta, and Richards). Choices are |
iterations |
The number of MCMC generations to use if |
SD |
Dispersion parameters for the |
headstart |
Logical: if TRUE and |
Grid |
Logical: if TRUE and |
ploidy |
Ploidy of the data, i.e., an integer (1 or 2) to multiply the sample size (number of individuals). |
trim |
Optional fraction of extreme values to omit from calculation of S (see |
include |
Optional vector of column indices to include in calculation of S - can be used to omit biological outliers. |
A list including a named matrix for each fitted model. Each such matrix includes the parameter estimates, maximum log-likelihood, AICc, squared Mahalanobis distance D2
, P-value for Mahalanobis-based outlier detection, and TRUE/FALSE declaration of whether a marker is an outlier based on a Bonferroni-adjusted critical P-value. If more than one model was fit, an additional data frame best.fit
is included, giving the model with lowest AIC for each marker.
Benjamin M. Fitzpatrick
Fitzpatrick, B. M. 2012. Alternative forms for genomic clines. In prep
See gcline.fn
for the basic fitting function. Cline.plot
provides an easy way to visualize the output of Cline.fit
.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.