Description Usage Arguments Details Value Value Warning References See Also Examples
View source: R/SelectionGradients.R
glam
is used to fit generalized linear models, specified by error distributions and link functions as denoted by family
, using approaches based on the quantitative framework established by Lande and Arnold (1983). Statistical methods are based on glm
for linear models and glmer
for linear mixed effects models. An option to employ the Janzen and Stern (1998) correction factor for logistic regression models is available via JS = TRUE
. Model formulae are constructed such that regression coefficients and standard errors for quadratic terms do NOT need to be doubled (Stinchcombe et al. 2008)
1 |
|
Fitness measure. Gaussian fitness types should use relative fitness, which is calculated as the absolute fitness for each individual |
|
Phenotypic traits. |
|
Type of distribution for the fitness metric. Option to either "gaussian" or "binomial". |
|
Janzen and Stern (1998) correction factor for make logistic regression coefficients congruent with linear regression coefficients for estimating multivariate selection. Default is |
|
Option to scale the phenotypic trait data ( |
|
Option to standardize the regression coefficients by either the mean or the standard deviation of |
|
Random effects of the model, if applicable. |
The Lande-Arnold Method is based on the 1983 paper by Russell Lande and Stevan Arnold, entitled "The measurement of selection on correlated characters". Their method involves applying ordinary least-squares (OLS) regression to estimate selection gradients.
The function returns an object of classes "glam
", "lm
", and "glm
."
GL
These analyses are currently only available for longitudinal data. Selection gradients for cross-sectional data must be evalated using matrix algebra rather than OLS regressions (Lande and Arnold 1983).
Janzen FJ, Stern HL. 1998. Logistic regression for empirical studies of multivariate selection. Evolution 52(6): 1564-1571. http://www.jstor.org/stable/2411330?seq=1#page_scan_tab_contents
Lande R, Arnold SJ. 1983. The measurement of selection on correlated characters. Evolution 37(6): 1210-1226. http://www.jstor.org/stable/2408842
Stinchcombe JR, Agrawal AF, Hohenlohe PA, Arnold SJ, Blows MW. 2008. Estimating nonlinear selection gradients using quadratic regression coefficients: double or nothing? Evolution 62(9): 2435-2440. http://onlinelibrary.wiley.com/doi/10.1111/j.1558-5646.2008.00449.x/abstract
glamx
, glm
, lm
, summary.glam
, glmer
1 2 3 4 5 6 7 8 9 10 11 12 | # use the BumpusMales data set
data(BumpusMales)
# Define the input
w <- BumpusMales$w
z <- BumpusMales[,3:11]
# Calculate the selection gradients using glam
mod1 <- glam(w, z, "gaussian")
# Review the summary statistics for the linear gradients
summary.glam(mod1$GL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.