Title Pearson-Aitken algorithm to calculate mean values in truncated multivariate normal distributions
PA_algorithm(mu, covmat, target_id, lower, upper, K_i = NA, K_pop = NA)
A list with two elements: est (expected genetic liability, given input data) and var (variance of genetic liability, given input data).
vector of means
covariance matrix, contaning kinship coefficient and heritability on each entry (except diagnoal, which is 1 for full liabilities and h2 for genetic liabilities)
ID of target individual (or genetic liability), i.e. rowname in covmat to return expected genetic liability for
vector of lower thresholds
vector of upper thresholds
vector of stratified CIPs for each individual. Only used for estimating genetic liability under the mixture model.
vector of population CIPs. Only used for estimating genetic liability under the mixture model.