MADSD <- function(Q, A, C, Sigma, rAC = 0, rnd = 3){
MAD = if(C > 0 & A > 0){2 * Sigma * sqrt(pmax((1 - (Q * A + C + 2 * (rAC * Q))), 0)/pi)} else if (C <= 0 & A > 0){2 * Sigma * sqrt(((1 - (Q * A))/pi))} else if (C > 0 & A <= 0){2 * Sigma * sqrt(((1 - C)/pi))}
SD = MAD * 1/sqrt(2/pi)
cat(paste0("The expected mean absolute deviation with a heritability of ", A * 100, "%, a shared environmentality of ", C * 100, "%, and a correlation between the two of ", rAC, " with ", Q * 100, "% relatedness is ", round(MAD, rnd), " and the standard deviation is ", round(SD, rnd), ". \n"))}
The formula for the Mean Absolute Deviation given some correlation, r, is \(2\sigma\sqrt{\frac{1-r}{\pi}}\). As shown by Geary (1935), under normality, you can get from the MAD to the SD by multiplying the MAD by \(1/\sqrt{\frac{2}{\pi}}\).
Per Falconer (Falconer & Mackay, 1998), the formula for heritability is \(2(r_{mz} - r_{dz})\). His formula for the shared environment is \(2r_{dz} - r_{mz}\) and the nonshared environment is simply the reciprocal of the monozygotic twin correlation, or \(1 - r_{mz}\). For a monozygotic twin correlation of 0.8 and a dizygotic twin correlation of 0.5, the heritability of the trait whose values were correlated is 60%, with 20% of the variance due to the shared environment, and the remaining 20% of the variance due to the unshared environment. These quantities are reasonably well-behaved, but a SEM handles them better, albeit with less power and with different specification risks (see Turkheimer et al., 2017).
2*(.8 - .5) #Heritability, A
## [1] 0.6
2*.5 - .8 #Shared Environment, C
## [1] 0.2
1 - .8 #Nonshared Environment, E
## [1] 0.2
With only these quantities, the correlation between monozygotic twins is equal to \(A + C + 2 * r(A, C)\) and the correlation between dizygotic twins is equal to \(\frac{1}{2}A + C + 2 * r(\frac{1}{2}A, C)\). It is usually assumed that \(r(A, C)\) and \(r(\frac{1}{2}A, C)\) both equal zero. With that and a normality assumption, the correlation between two relatives of an arbitrary degree of relatedness, Q, is \(QA + C + 2 * r(QA, C)\). Therefore, say we wish to understand the correlation between half-siblings (Q = 0.25) when a trait is 60% heritability and 20% shared environmental with no gene-environment correlation. The phenotypic correlation is \(\frac{1}{4}0.6 + 0.2 = 0.35\). If this is extrapolated out of the sibling context, additional parameters or adjustments might be needed for age and cohort differences. In any case, the shared environment should be consistently interpreted as “environmentally (or dominance) induced similarity”.
Given some level of heritability, shared environmentality, etc., we can produce the phenotypic correlation and thus the expected MAD and, thus, the SD for the phenotype given some degree of relatedness. We can do this through simple amendment of the formula for the MAD and SD based on our knowledge of what produces the correlations between people of differing degrees of relatedness. The MAD with ACE components is written as \(2\sigma\sqrt{\frac{1 - (QA + C + 2 * r(QA, C))}{\pi}}\), and the SD follows accordingly.
MADSD(0.5, 0.6, 0.2, 15, 0) #>0 A and C and 0 rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 20%, and a correlation between the two of 0 with 50% relatedness is 11.968 and the standard deviation is 15.
MADSD(0.5, 0.6, 0, 15, 0) #>0 A and 0 C or rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 0%, and a correlation between the two of 0 with 50% relatedness is 14.161 and the standard deviation is 17.748.
MADSD(0.5, 0, 0.2, 15, 0) #>0 C and 0 A or rGE
## The expected mean absolute deviation with a heritability of 0%, a shared environmentality of 20%, and a correlation between the two of 0 with 50% relatedness is 15.139 and the standard deviation is 18.974.
MADSD(0.5, 0.6, 0.2, 15, rAC = 0.2) #>0 A, C, and rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 20%, and a correlation between the two of 0.2 with 50% relatedness is 9.271 and the standard deviation is 11.619.
MADSD(0.5, 0.6, 0, 15, rAC = 0.2) #>0 A, 0 C, and >0 rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 0%, and a correlation between the two of 0.2 with 50% relatedness is 14.161 and the standard deviation is 17.748.
MADSD(0.5, 0, 0.2, 15, rAC = 0.2) #>0 C, 0 A, and >0 rGE
## The expected mean absolute deviation with a heritability of 0%, a shared environmentality of 20%, and a correlation between the two of 0.2 with 50% relatedness is 15.139 and the standard deviation is 18.974.
MADSD(0.5, 0.6, 0.2, 15, rAC = 0.5) #>0 A, C, and rGE, with high rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 20%, and a correlation between the two of 0.5 with 50% relatedness is 0 and the standard deviation is 0.
MADSD(0.5, 0.6, 0, 15, rAC = 0.5) #>0 A, 0 C, and high rGE
## The expected mean absolute deviation with a heritability of 60%, a shared environmentality of 0%, and a correlation between the two of 0.5 with 50% relatedness is 14.161 and the standard deviation is 17.748.
MADSD(0.5, 0, 0.2, 15, rAC = 0.5) #>0 C, 0 A, and high rGE
## The expected mean absolute deviation with a heritability of 0%, a shared environmentality of 20%, and a correlation between the two of 0.5 with 50% relatedness is 15.139 and the standard deviation is 18.974.
When the sum of A * Q, C, and rGE * Q is greater than or equal to 1, the expected difference is 0 because the phenotypic correlation is perfect, and as such, the standard deviation is too. As demonstrated in the above examples, this function does not assume any level of A, C, rGE, or relatedness, but it does assume a lack of nonlinear gene-environment interactions. The function could be amended to account for those, but they are so rarely observed that the effort is uncalled for.
Geary, R. C. (1935). The Ratio of the Mean Deviation to the Standard Deviation as a Test of Normality. Biometrika, 27(3/4), 310–332. https://doi.org/10.2307/2332693
Falconer DS, Mackay TF (1998). Introduction to quantitative genetics (4th ed.). Essex: Longman Group, Ltd. ISBN 978-0-582-24302-6.
Turkheimer, E., Beam, C. R., Sundet, J. M., & Tambs, K. (2017). Interaction between Parental Education and Twin Correlations for Cognitive Ability in a Norwegian Conscript Sample. Behavior Genetics, 47(5), 507–515. https://doi.org/10.1007/s10519-017-9857-z
Jensen, A. R. (1973). Let’s understand Skodak and Skeels, finally. Educational Psychologist, 10(1), 30–35. https://doi.org/10.1080/00461527309529086
Jensen, A. R. (1998). The g Factor: The Science of Mental Ability. Praeger Publishers/Greenwood Publishing Group.
Oftentimes, people will talk about large environmental effects as if they nullify high heritabilities (see Jensen, 1973). A simple illustration that this is not the case will help to clarify why this sort of thinking is usually wrong.
HerEnvMADSD <- function(A, SD, EE, rnd = 3){ #A = Additive Genetic Variance, SD = Phenotypic SD
TotVar = SD^2; AVar = A * TotVar; EVar = (1 - A) * TotVar
ASD = sqrt(AVar); ESD = sqrt(EVar)
MAD = (sqrt(2 * pi) * ASD)/pi; MED = (sqrt(2 * pi) * ESD)/pi
EESD = EE/ESD
cat(paste0("With a heritability of ", A * 100, "% and a phenotypic SD of ", SD, ", the genetic and environmental SDs are ", round(ASD, rnd), " and ", round(ESD, rnd), " while the mean absolute genetic deviation is ", round(MAD, rnd), " and the mean absolute environmental deviation is ", round(MED, rnd), ". A purely environmental ", EE, "-point effect could arise from an environment ", round(EESD, rnd), " SDs from the environmental mean, or stated differently, in the ", round(pnorm(EESD), rnd) * 100, "th percentile of environments. \n"))}
HerEnvMADSD(.8, 10, 3)
## With a heritability of 80% and a phenotypic SD of 10, the genetic and environmental SDs are 8.944 and 4.472 while the mean absolute genetic deviation is 7.136 and the mean absolute environmental deviation is 3.568. A purely environmental 3-point effect could arise from an environment 0.671 SDs from the environmental mean, or stated differently, in the 74.9th percentile of environments.
HerEnvMADSD(.8, 10, 10)
## With a heritability of 80% and a phenotypic SD of 10, the genetic and environmental SDs are 8.944 and 4.472 while the mean absolute genetic deviation is 7.136 and the mean absolute environmental deviation is 3.568. A purely environmental 10-point effect could arise from an environment 2.236 SDs from the environmental mean, or stated differently, in the 98.7th percentile of environments.
HerEnvMADSD(.2, 10, 3)
## With a heritability of 20% and a phenotypic SD of 10, the genetic and environmental SDs are 4.472 and 8.944 while the mean absolute genetic deviation is 3.568 and the mean absolute environmental deviation is 7.136. A purely environmental 3-point effect could arise from an environment 0.335 SDs from the environmental mean, or stated differently, in the 63.1th percentile of environments.
HerEnvMADSD(.2, 10, 10)
## With a heritability of 20% and a phenotypic SD of 10, the genetic and environmental SDs are 4.472 and 8.944 while the mean absolute genetic deviation is 3.568 and the mean absolute environmental deviation is 7.136. A purely environmental 10-point effect could arise from an environment 1.118 SDs from the environmental mean, or stated differently, in the 86.8th percentile of environments.
Relatedly, Jensen’s Rising Constraints model for group differences illustrates the plausibility (or lack thereof) of claims that a group difference in a heritable attribute is attributable to environmental differences (Jensen, 1998, pp. 447 - 458).
EnvironmentalWorseness <- function(A, d, rnd = 3){
Constraint = d / sqrt(1 - A)
Higher = pnorm(Constraint)
CLESHigher = pnorm(Constraint / sqrt(2))
Overlap = 2 * pnorm(-abs(Constraint) / 2)
cat(paste0("Given a zero between-group heritability and a common within-group heritability of ", A * 100, "% alongside a group difference of ", d, " Cohen's d, ", round(Higher, rnd) * 100, "% of the higher-scoring group have better environments than the average person of the lower-scoring group, and the environmental overlap is ", round(Overlap, rnd) * 100, "%, with a common-language effect size (probability of environmental superiority for the higher-scoring group) of ", round(CLESHigher, rnd) * 100, "%. \n"))}
EnvironmentalWorseness(.8, 1.1)
## Given a zero between-group heritability and a common within-group heritability of 80% alongside a group difference of 1.1 Cohen's d, 99.3% of the higher-scoring group have better environments than the average person of the lower-scoring group, and the environmental overlap is 21.9%, with a common-language effect size (probability of environmental superiority for the higher-scoring group) of 95.9%.
EnvironmentalWorseness(.2, 1.1)
## Given a zero between-group heritability and a common within-group heritability of 20% alongside a group difference of 1.1 Cohen's d, 89.1% of the higher-scoring group have better environments than the average person of the lower-scoring group, and the environmental overlap is 53.9%, with a common-language effect size (probability of environmental superiority for the higher-scoring group) of 80.8%.
EnvironmentalWorseness(.8, 0.2)
## Given a zero between-group heritability and a common within-group heritability of 80% alongside a group difference of 0.2 Cohen's d, 67.3% of the higher-scoring group have better environments than the average person of the lower-scoring group, and the environmental overlap is 82.3%, with a common-language effect size (probability of environmental superiority for the higher-scoring group) of 62.4%.
EnvironmentalWorseness(.2, 0.2)
## Given a zero between-group heritability and a common within-group heritability of 20% alongside a group difference of 0.2 Cohen's d, 58.8% of the higher-scoring group have better environments than the average person of the lower-scoring group, and the environmental overlap is 91.1%, with a common-language effect size (probability of environmental superiority for the higher-scoring group) of 56.3%.