fstmatrix | R Documentation |
Cultural FST is a proportion of between-group cultural variance to the total cultural variance in a particular trait.
fstmatrix(d, matrixtype = NULL)
d |
A matrix where the first column is sample size, and the second column is trait frequency. Ideally, the row names are group identifiers |
matrixtype |
If unspecified, this function will return a full group x group square matrix. If "upper", this returns an upper triangular matrix, "lower" returns a lower traiangular matrix. |
This function returns a square group x group matrix that includes Cultural FST values between each group. If all of the variance lies between the groups, FST = 1. If all of the variance exists within groups, FST = 0.
This function will work with 2 or more groups.
Bell, A. V., Richerson, P. J., & McElreath, R. (2009). Culture rather than genes provides greater scope for the evolution of large-scale human prosociality. Proceedings of the National Academy of Sciences, 106(42), 17671-17674.
Handley, C., & Mathew, S. (2020). Human large-scale cooperation as a product of competition between cultural groups. Nature communications, 11(1), 702.
Wright, S. (1965). The interpretation of population structure by F-statistics with special regard to systems of mating. Evolution, 395-420.
# across 8 groups, we have sample size, and total number of participants who listed things coded as "moral" when asked to list things that anger a locally-respected god
data(moralgod)
fstmatrix(moralgod)
fstdist <- as.dist(fstmatrix(moralgod, matrixtype = "lower"))
plot(hclust(fstdist), ylab = NA, xlab = NA, main = NA) # dendrogram
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.