I_traits: Partitioning the opportunity for selection due to individual...

Description Usage Arguments Value References Examples

View source: R/OpportunityForSelection.R

Description

Calculation of the opportunity for selection based on the method provided by Moorad and Wade (2013), in which the variation in fitness due to a given trait can be calculated as the product of its selection gradient and selection differential. The I_traits function was written using the code provided in the supplementary material of Moorad and Wade (2013), with slight modifications including a slight correction to s = b * q * unimputed.var rather than s = B * q * unimputed.var. In addition, the original method by Moorad and Wade (2013) estimated the selection differentials using simple linear regressions that could incorporate weights, but I_traits estimates the selection differentials using the covariance method (Phillips and Arnold 1983) that does not incorporate weights. The I_traits function also automatically mean-centers the phenotypic traits.

Usage

1
I_traits(fitness, z, fitType = c("rel", "abs"), zType = c("long", "cross"))

Arguments

z

Phenotypic traits.

fitness

Vector of numeric or integer values that represent the fitness metric or proxy.

fitType

Type of fitness metric or proxy, either absolute fitness ("W") or relative fitness ("w").

zType

Type of data: "long" = longitudinal, and "cross" = cross-sectional.

Value

I_traits returns a matrix of numeric values.

References

Lande R, Arnold SJ. 1983. The measurement of selection on correlated characters. Evolution 37(6): 1210-1226. http://www.jstor.org/stable/2408842

Moorad JA, Wade MJ. 2013. Selection gradients, the opportunity for selection, and the coefficient of determination. The American Naturalist 181(3): 291-300. http://www.journals.uchicago.edu/doi/abs/10.1086/669158

Phillips PC, Arnold SJ. 1989. Visualizing multivariate selection. Evolution 43(6): 1209-1222. http://www.jstor.org/stable/2409357

Examples

1
2
3
4
# load the dataset
data(BumpusMales)
# Calculate the total opportunity for selection
I_total(BumpusMales$W, type = "W")

MorphoFun/psa documentation built on Nov. 10, 2021, 7:01 a.m.