Compute a sample covariance matrix from "phenotypes.txt"
as generated by simulation functions.
calculate_cov(pheno, sibs)
pheno | dataset with phenotypes, as loaded by |
---|---|
sibs | optional: number of siblings to be included in covariance matrix. Defaults to using all of an individual's siblings. |
A covariance matrix using the data from pheno
.
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.