### Initialize StatTest object Source: https://statannotations.readthedocs.io/en/latest/custom-test.html Example of initializing a StatTest object with a custom function. ```python from statannotations.stats.StatTest import StatTest custom_long_name = 'Log t-test' custom_short_name = 'log-t' custom_func = log_ttest custom_test = StatTest(custom_func, custom_long_name, custom_short_name) ``` -------------------------------- ### Custom t-test function Source: https://statannotations.readthedocs.io/en/latest/custom-test.html Example of a custom t-test function that operates on log-transformed data. ```python import numpy as np from scipy.stats import ttest_ind def log_ttest(group_data1, group_data2, **stats_params): group_data1_log = np.log(group_data1) group_data2_log = np.log(group_data2) return ttest_ind(group_data1_log, group_data2_log, **stats_params) ``` -------------------------------- ### Configure Annotator with custom test Source: https://statannotations.readthedocs.io/en/latest/custom-test.html Example of configuring an Annotator object to use a custom StatTest. ```python annot = Annotator(, ) annot.configure(test=custom_test, comparisons_correction=None, text_format='star') ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.