Learn R Programming

Emil M. Pedersen 01/02/2024

LTFHPlus

LTFHPlus implements the method LT-FH++, an extension of the liability threshold model conditioned on family history (LT-FH). It accounts for information such as right censoring, age of onset, sex, and cohort effects, and allows for flexible family structures.

LT-FH++ can be used to estimate an individual’s genetic component of the full liability, the full liability or both by accounting for the family history and population prevalences. It utilises an efficient Gibbs sampler, which is implemented with Rcpp and is highly scaleable. A detailed description of the liability threshold model conditioned on family history, age of onset and sex can be found here.

Installation

You can install LTFHPlus by:

devtools::install_github("EmilMiP/LTFHPlus")

or for the CRAN version:

install.packages("LTFHPlus")

Documentation

Documentation for the different functions, as well as examples of how to use them, can be found on this pkgdown website.

Changes to 2.0

The most important change to version 2.0 is a more flexible covariance matrix construction, and the corresponding update to the input. The change to the covariance matrix allows users to include family members with far more flexibility, allowing users to completely exclude parents, use paternal/maternal half-siblings, grandparents, and more.

Copy Link

Version

Install

install.packages('LTFHPlus')

Monthly Downloads

191

Version

2.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Emil Michael Pedersen

Last Published

November 17th, 2025

Functions in LTFHPlus (2.2.0)

construct_covmat

Constructing a covariance matrix for a variable number of phenotypes
prepare_LTFHPlus_input

Prepares input for estimate_liability
label_relatives

Label Pairwise Relationships Based on Generational Distance and Kinship Coefficient
get_family_graphs

Automatically identify family members of degree n
get_relations

Compute and Label Pairwise Relationships Across Multiple Family Graphs
graph_to_trio

Convert from igraph to trio information
get_generations

Compute Generational Distances and Kinship Coefficients from a Family Graph
graph_based_covariance_construction

Constructing covariance matrix from local family graph
get_relatedness

Relatedness between a pair of family members
graph_based_covariance_construction_multi

Constructing covariance matrix from local family graph for multi trait analysis
get_kinship

Construct kinship matrix from graph
simulate_under_LTM_single

Simulate under the liability threshold model (single phenotype).
truncated_normal_cdf

CDF for truncated normal distribution.
simulate_under_LTM_multi

Simulate under the liability threshold model (multiple phenotypes).
simulate_under_LTM

Simulate under the liability threshold model.
prepare_graph

Construct graph from register information
rtmvnorm.gibbs

Gibbs Sampler for the truncated multivariate normal distribution
attach_attributes

Attach attributes to a family graphs
LTFHPlus-package

LTFHPlus: Implementation of LT-FH++
convert_format

Attempts to convert the list entry input format to a long format
Relation_per_proband_plot

Plot the (Average) Number of Relatives per Proband by Relationship Type
convert_age_to_thresh

Convert age to threshold
construct_covmat_multi

Constructing a covariance matrix for multiple phenotypes
construct_covmat_single

Constructing a covariance matrix for a single phenotype
convert_cir_to_age

Convert cumulative incidence rate to age
convert_age_to_cir

Convert age to cumulative incidence rate
fixSexCoding

Fixing sex coding in trio info
estimate_liability_single

Estimating the genetic or full liability
estimate_gen_liability_ltfh

Estimate genetic liability similar to LT-FH
convert_liability_to_aoo

Convert liability to age of onset
estimate_liability

Estimating the genetic or full liability for a variable number of phenotypes
get_all_combs

construct all combinations of input vector
convert_observed_to_liability_scale

Convert the heritability on the observed scale to that on the liability scale
estimate_liability_multi

Estimating the genetic or full liability for multiple phenotypes
correct_positive_definite

Positive definite matrices
familywise_attach_attributes

Wrapper to attach attributes to family graphs