Compute a sample covariance matrix from "phenotypes.txt" as generated by simulation functions.

calculate_cov(pheno, sibs)

Arguments

pheno

dataset with phenotypes, as loaded by load_phenotypes().

sibs

optional: number of siblings to be included in covariance matrix. Defaults to using all of an individual's siblings.

Value

A covariance matrix using the data from pheno.

Details

The outputted matrix follows the order described in vignette("liability-distribution").The output can be used to validate that covariances between the liabilities of family members are as expected.
The sibs parameter can be used to adjust how many siblings to calculate the covariance between.