Skip to contents

Family history estimators

Family history estimators available in the LTFGRS package.

estimate_liability()
Estimating the genetic or full liability for a variable number of phenotypes
estimate_gen_liability_ltfh()
Estimate genetic liability similar to LT-FH
kendler()
Title Kendler's FGRS

Data preparation functions

Functions used to prepare data for the family history estimators.

attach_attributes()
Attach attributes to a family graphs
censor_family_onsets()
Censor onset times in a family based on a proband's end of follow-up.
familywise_censoring()
Censor Family Onsets for Multiple Families
familywise_attach_attributes()
Wrapper to attach attributes to family graphs
get_family_graphs()
Automatically identify family members of degree n
get_onset_time()
Calculate age of diagnosis, age at end of follow up, and status
graph_to_trio()
Convert from igraph to trio information
prepare_thresholds()
Calculate (personalised) thresholds based on CIPs.
prepare_graph()
Construct graph from register information

Simulation functions

Functions used to simulate data for the liability threshold model family history estimators.

construct_covmat()
Constructing a covariance matrix for a variable number of phenotypes
construct_covmat_multi()
Constructing a covariance matrix for multiple phenotypes
construct_covmat_single()
Constructing a covariance matrix for a single phenotype
convert_age_to_cir()
Convert age to cumulative incidence rate
convert_age_to_thresh()
Convert age to threshold
convert_cir_to_age()
Convert cumulative incidence rate to age
convert_liability_to_aoo()
Convert liability to age of onset
estimate_liability_single()
Estimating the genetic or full liability
estimate_liability_multi()
Estimating the genetic or full liability for multiple phenotypes
simulate_under_LTM()
Simulate under the liability threshold model.
simulate_under_LTM_multi()
Simulate under the liability threshold model (multiple phenotypes).
simulate_under_LTM_single()
Simulate under the liability threshold model (single phenotype).
convert_format()
Attempts to convert the list entry input format to a long format

Internal functions and functions used in the estimator functions

The primary functions used in the family history estimators and some helper functions.

convert_observed_to_liability_scale()
Convert the heritability on the observed scale to that on the liability scale
correct_positive_definite()
Positive definite matrices
extract_estimation_info_graph()
Title Internal Function used to extact input needed from graph input for liability estimation
extract_estimation_info_tbl()
Title Internal Function used to extact input needed for liability estimation
fixSexCoding()
Fixing sex coding in trio info
get_all_combs()
construct all combinations of input vector
get_covmat()
Construct kinship matrix from graph
get_relatedness()
Relatedness between a pair of family members
graph_based_covariance_construction()
Constructing covariance matrix from local family graph
graph_based_covariance_construction_multi()
Constructing covariance matrix from local family graph for multi trait analysis
Gibbs_estimator()
Wrapper around the Gibbs Sampler that returns formatted liability estimates for the proband
kendler_family_calculations()
Title Helper function for Kendler's FGRS
PA_algorithm()
Title Pearson-Aitken algorithm to calculate mean values in truncated multivariate normal distributions
rtmvnorm.gibbs()
Gibbs Sampler for the truncated multivariate normal distribution
tnorm_mean()
Title: Calculate the mean of the truncated normal distribution
tnorm_mixture_conditional()
Title: Calculates mean and variance of mixture of two truncated normal distributions
tnorm_var()
Title: Calculate the variance of the truncated normal distribution
truncated_normal_cdf()
CDF for truncated normal distribution.