skbio.math.stats.misc.p_value_to_str

skbio.math.stats.misc.p_value_to_str(p_value, permutations)[source]

Format p-value as a string with the correct number of decimals.

Number of decimals is determined by the number of permutations.

Parameters:

p_value : float or None

p-value to convert to string.

permutations : int

Number of permutations used to calculate p_value.

Returns:

str

p_value formatted as a string with the correct number of decimals. If p_value is None or np.nan, 'N/A' is returned. If permutations is less than 10, a message stating insufficient number of permutations is returned.