Repository navigation
TreeMineR 1.1.0
-
Fixed Monte Carlo P-value calculation in
TreeMineR(). Simulated maximum log-likelihood ratios (LLRs) equal to the observed LLR are now counted as at least as extreme as the observed value (>=instead of>), as required for a valid Monte Carlo P-value. Previously, ties were excluded, which inflated the family-wise type-I error rate, particularly for sparse count data with many possible ties (#9). -
Fixed
calc_llr()so that nodes in which every individual is exposed (or every individual is unexposed) no longer get an undefined (NaN) log-likelihood ratio. Such nodes were previously dropped from both the simulated reference distribution and the reported results, which could bias P-values (#9). -
Added a check to
TreeMineR()which now throws an error ifpis not greater than 0 and smaller than 1.p = 0orp = 1made the log-likelihood ratio degenerate (Inf) for all nodes containing exposed, respectively unexposed, individuals. -
Monte Carlo simulations in
TreeMineR()now preserve the correlation between related cuts. Exposure is simulated once per individual and re-aggregated through the tree, rather than resampling every cut independently, so a parent cut's simulated count is now mechanically consistent with its children's, as it is in the observed data (#10). -
Added a check which now throws an error if
datadoes not contain any rows, and iftreecontains leafs that are duplicated across different branches. Both previously caused an uninformative error from internaldata.tableoperations.