Skip to contents

LTFGRS 1.2.0

Potentially breaking changes

  • prepare_thresholds() now defaults personal_thr = TRUE (previously FALSE), aligning it with prepare_thresholds_multi()’s existing default. interpolation = NA (the raw-merge path) now also respects personal_thr and computes K_i/K_pop, which it previously did not - this path always behaved as if personal_thr = TRUE before, regardless of what was passed, and never returned K_i/K_pop at all. If you rely on population-level thresholds from the merge path, pass personal_thr = FALSE explicitly.

Bug fixes

  • Fixed prepare_thresholds()’s default interpolation = NULL, which crashed immediately (is.na(NULL) is logical(0)) - now defaults to NA.
  • Fixed familywise_censoring() silently using the literal string "fid" instead of per-row family ids when fid was customized to something else, due to a bare symbol reference instead of !!as.symbol(fid).
  • Fixed get_relatedness() treating all pairs of children as full siblings regardless of which parent they shared, due to an unescaped . in a regex.
  • Fixed get_generations() silently returning no relatives at all when family graph ids were not purely numeric strings (e.g. "mother" rather than "123").
  • Fixed an operator-precedence error in PA_algorithm()’s reordering logic, triggered when the target individual was not already the first row/column of the covariance matrix and had informative threshold data of its own (i.e. was not the latent genetic-liability node). This is not reachable through estimate_liability(), which always targets the genetic-liability node, so this is unlikely to have affected anyone using PA_algorithm() only via the estimator functions; it could affect direct use of PA_algorithm() outside of that.
  • Fixed extract_estimation_info_tbl() inserting spurious NA rows when add_ind = FALSE and neither the "g" nor "o" role was present in the input.
  • Fixed validating_graph_input() (now validate_graph_input()) only requiring any one of the expected graph attributes to be present, rather than all of them.
  • validate_tbl_input()/validate_tbl_input_multi() (formerly validating_tbl_input*()) no longer silently swap lower/upper thresholds when lower > upper (a swap that also broke on -Inf/Inf bounds) - they now report the problem as an error instead.
  • Fixed tnorm_mixture_conditional() applying its K_i/K_pop mixture weighting to known cases (lower == upper, as produced by prepare_thresholds(..., lower_equal_upper = TRUE)), shrinking their mean away from the true dirac point mass and inflating their variance away from 0. The mixture is only meaningful when there is a real future-tail component to weigh against upper; this only affected estimate_liability(..., method = "PA", useMixture = TRUE) combined with lower_equal_upper = TRUE.
  • tnorm_mixture_conditional() now errors if only one of K_i/K_pop is NA (both being NA remains a valid opt-out of the mixture), instead of silently propagating NA through the whole PA_algorithm() result.
  • rtmvnorm.gibbs() no longer attempts to silently swap lower/upper when lower > upper - it now errors, matching validate_tbl_input()’s handling of the same situation. The swap used an add/subtract-based swap trick that produced NaN whenever either bound was -Inf/Inf (e.g. lower = 5, upper = -Inf); -Inf/Inf bounds are used throughout this package for uninformative/unbounded thresholds, so a lower/upper mix-up involving one is a plausible mistake, not a contrived one.
  • Fixed the internal correct_positive_definite_simplified() - used by all four extract_estimation_info_*() functions to fix up non-positive-definite covariance matrices before estimation - unconditionally erroring (“Unable to enforce a positive definite covariance matrix”) whenever a covariance matrix needed correcting at all, even when the correction fully succeeded. Its final success check re-tested the eigenvalues computed before the correction loop ran, which were guaranteed to still be negative (that’s why the loop ran in the first place), rather than the (possibly now-corrected) matrix the loop actually produced. This made the correction machinery entirely non-functional: any non-positive-definite covariance matrix reaching estimation would crash instead of being corrected.
  • Fixed truncated_normal_cdf()’s normalizing division (return(...) / (...)) sitting outside return()’s parens, so it never executed and the function silently returned only the numerator instead of a properly normalized CDF. This also affected convert_liability_to_aoo(dist = "normal"), which calls it internally.
  • estimate_liability_multi() now errors upfront if target_phenotype is not specified when method = "PA", instead of failing later inside PA_algorithm() with an unrelated-looking “Target ID not found in covariance matrix” error. Also restricted the existing target_phenotype %in% phen_names check to method = "PA" - a Gibbs run could previously be stopped by a target_phenotype that didn’t match phen_names, despite it being irrelevant to Gibbs.
  • Fixed estimate_gen_liability_ltfh() crashing for any individual with one or more siblings in its “no sibling-status mixture needed” branch (i.e. up to 1 sibling of any status, or 2+ siblings that are all known controls) - the covariance matrix there was built without any sibling slots at all, while the threshold assignment right after it assumed they existed.
  • Fixed extract_estimation_info_tbl_multi() not forwarding phen_names to construct_covmat(), so the covariance matrix it built always used the default "phenotype1"/"phenotype2" column names regardless of what was actually passed in - breaking alignment with the rest of the tibble for any custom phen_names.
  • Fixed estimate_liability_single() reporting the family id instead of the proband’s own personal id in the pid column of its .tbl-input results, whenever the two differ - the normal case for real data.
  • Fixed Gibbs_estimator()’s handling of out for multiple phenotypes, which previously always selected every phenotype’s genetic-liability column regardless of out - requesting out = 2 (“full” liability) silently returned genetic liability mislabeled as “full”, and out = c(1, 2) crashed outright. The first attempt at this fix matched columns by name, which only worked for the .tbl path - the graph path names its columns differently, so every multi-trait Gibbs estimate via family_graphs input returned NA. Fixed by position instead of name, since both paths guarantee genetic liability is the 1st and full liability the 2nd entry of each phenotype’s block in the covariance matrix.
  • estimate_liability_single() and estimate_liability_multi() now error upfront if both .tbl and family_graphs are supplied, instead of silently using .tbl and ignoring family_graphs entirely - a user supplying both is likely expecting the two to be combined (e.g. thresholds from .tbl, pedigree structure from family_graphs), which is not supported.

Other changes

  • Substantial internal reorganization of the R/ source files - no change to the public API beyond the items above.

LTFGRS 1.1.2

  • minor changes to helper functions for simulations
  • Added partition_indices() to assist in processing large datasets in batches.

LTFGRS 1.1.1

  • Fixed bugs with Kendler implementation.
  • Changed default values for cohabitation effects in the Kendler FGRS to 0 and highlighted the different coding used.
  • Highlighted that it is a simplified Kendler implementation and not as elaborate as the full version.
  • Changed kendler to kendler_simplified to avoid confusion with the full Kendler model.
  • Updated several documentation files with formatting and clarity.
  • Added several Vignettes on
    • example modifications of graphs with igraph
    • (simplified) Kendler FGRS implementation
    • workflow example for FGRS for GWAS
    • labelling and plotting family relations
  • Migrated labelling and plotting functions to LTFGRS from LTFHPlus

LTFGRS 1.1.0

First version of the multi-trait implementation with no notes on checks.

LTFGRS 1.0.1

CRAN release: 2025-08-28

  • Minor changes to accommodate CRAN policies.

LTFGRS 1.0.0

CRAN release: 2025-07-07

  • Initial CRAN submission.