pydigree.stats package¶
Subpackages¶
Submodules¶
pydigree.stats.mathfuncs module¶
Misc math functions
-
pydigree.stats.mathfuncs.grid(func, nargs, low, high, ntests=10, predicate=None)¶ Evaluates a function over a range of argument values.
This can be time consuming, especially if the function to be evaluated is particularly intensive: for m tests over n arguments, the function will be evaluated m**n times
Parameters: - func (callable) – The function to be grid searched
- low – The lowest value to test
- high – The highest value to test
- ntests – Number of argument values to test between low and high
- predicate (callable) – a function that returns True if the configuration of arguments should be evaluated.
-
pydigree.stats.mathfuncs.is_positive_definite(mat)¶ Evaluates if a matrix is positive definite (all eigvals > 0)
Parameters: mat (matrix) – Matrix to test Returns: positive-definiteness Return type: bool
pydigree.stats.stattests module¶
Methods for statistical testing
-
pydigree.stats.stattests.LikelihoodRatioTest(null_model, alt_model)¶ Compares two nested models by likelihood ratio test
Returns: Result of test Return type: LikelhoodRatioTestResult
-
class
pydigree.stats.stattests.LikelihoodRatioTestResult(statistic, df, distribution, n)¶ Bases:
objectThe result of a likelihood ratio test.
Variables: - statistic – test statistic
- df – degrees of freedom
- distribution – distribution of test statistic
- n – sample size
-
lod¶ LOD score (log10 LR) of the result
Rtype float:
-
pvalue¶ P-value for the test
Return type: float
pydigree.stats.variancecomponents module¶
-
class
pydigree.stats.variancecomponents.VarianceComponentsLinkage(pedigrees, outcome=None, fixed_effects=None, ibd_matrix=None, null_model=None, joint=False, verbose=False, maximization='Average Information')¶ Bases:
object-
fit()¶
-
fit_alternative_model()¶
-
fit_null_model()¶
-
-
class
pydigree.stats.variancecomponents.VarianceComponentsLinkageResult(null_llik=None, alt_llik=None, lod=None)¶ Bases:
object