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.prepare_thresholds()’s default
interpolation = NULL, which crashed immediately
(is.na(NULL) is logical(0)) - now defaults to
NA.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).get_relatedness() treating all pairs of children
as full siblings regardless of which parent they shared, due to an
unescaped . in a regex.get_generations() silently returning no relatives
at all when family graph ids were not purely numeric strings
(e.g. "mother" rather than "123").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.extract_estimation_info_tbl() inserting spurious
NA rows when add_ind = FALSE and neither the
"g" nor "o" role was present in the
input.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.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.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.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.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.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.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.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.R/ source
files - no change to the public API beyond the items above.kendler to kendler_simplified to
avoid confusion with the full Kendler model.First version of the multi-trait implementation with no notes on checks.