approx_conditional() uses an equation that can be heavily reduced to estimate the conditional variance of a phenotype.
|
p_s2 <- (n * means[2]^2 + (n - 1) * covs[2, 2] - a * n * means[2] - |
|
b * (n * means[1] * means[2] + (n - 1) * covs[1, 2])) / (n - 2) |
This can be reduced to:
p_s2 <- (n-1) * (covs[2, 2] - b * covs[1, 2]) / (n - 2)
approx_conditional()uses an equation that can be heavily reduced to estimate the conditional variance of a phenotype.pcsstools/R/multiplication_estimation.R
Lines 416 to 417 in 7187ab8
This can be reduced to: