PredictiveCheckTest.pvalue#
- PredictiveCheckTest.pvalue(statistic, name=None)[source]#
One statistic’s tail probabilities, for every variable or for one.
- Parameters:
statistic (
str) – A name fromstatistics.name (
str|None) – A variable label fromnames;Nonereturns the whole(k,)row.
- Return type:
- Returns:
The
(k,)row ofpvaluesfor the statistic, or the single float for the named variable.- Raises:
SpecificationError – If the statistic or the variable is unknown. The message lists what the check does carry.
Example
>>> import numpy as np >>> rng = np.random.default_rng(1) >>> y = rng.standard_normal((100, 2)) >>> check = replication_check(y, rng.standard_normal((200, 100, 2))) >>> check.pvalue("mean").shape (2,) >>> 0.0 <= check.pvalue("mean", "y1") <= 1.0 True >>> check.pvalue("median") Traceback (most recent call last): ... cultivars.exceptions.SpecificationError: unknown statistic 'median'; ...