yasa.SleepStatsAgreement.report#

SleepStatsAgreement.report(bias_method='auto', loa_method='auto', ci_method='auto', decimals=2)[source]#

Return a human-readable DataFrame for reporting bias, limits of agreement, and statistical assumption results.

Each row corresponds to one sleep statistic, labelled with its unit (e.g. "TST (min)"). Reference and observed scorer means are shown first, followed by bias and LoA merged with their confidence intervals (e.g. "2.34 [1.10, 3.58]"). An "Assumptions" column shows whether each statistical assumption was met ("✓") or violated ("✗"), which drives the automatic method selection.

Parameters:
bias_methodstr

If 'param' (parametric), bias is always the mean difference. If 'regr' (regression), bias is always a regression equation. If 'auto' (default), the method is chosen per statistic based on the proportional-bias assumption test.

loa_methodstr

Method used to compute limits of agreement. Options:

  • 'param' — constant LoA: bias ± 1.96 SD. Always uses this form regardless of assumptions or log_transform.

  • 'regr' — regression LoA: b0 + b1 × ref. Always uses this form regardless of assumptions or log_transform.

  • 'log' — Euser LoA: bias ± slope × ref. Requires log_transform=True; raises ValueError otherwise.

  • 'auto' (default) — if log_transform=True, always uses 'log'. Otherwise, uses 'param' when the homoscedasticity assumption passes and 'regr' when it fails.

ci_methodstr

If 'param', parametric t-distribution CIs are used. If 'boot', BCa bootstrap CIs are used. If 'auto' (default), the method is chosen per statistic based on the normality assumption test.

decimalsint

Number of decimal places. Default is 2.

Returns:
reportpandas.DataFrame

A DataFrame indexed by "sleep_stat (unit)" with columns:

  • f"{ref_scorer} mean" — mean value for the reference scorer.

  • f"{obs_scorer} mean" — mean value for the observed scorer.

  • f"Bias [{pct}% CI]" — mean bias or regression equation, with CI in brackets.

  • f"LoA [{pct}% CI]" — lower–upper LoA or regression equation, with CI in brackets.

  • "Assumptions" — pass/fail for unbiased, normal, constant bias, homoscedastic.