R/Covariance_matrix_functions.R
graph_based_covariance_construction.Rd
Function that constructs the genetic covariance matrix given a graph around a proband and extracts the threshold information from the graph.
graph_based_covariance_construction(
pid,
cur_proband_id,
cur_family_graph,
h2,
add_ind = TRUE
)
Name of column of personal ID
id of proband
local graph of current proband
liability scale heritability
whether to add genetic liability of the proband or not. Defaults to true.
list with two elements. The first element is temp_tbl, which contains the id of the current proband, the family ID and the lower and upper thresholds. The second element, cov, is the covariance matrix of the local graph centered on the current proband.