yasa.SleepStatsAgreement.summary#
- SleepStatsAgreement.summary(ci_method='auto', sleep_stats=None)[source]#
Return a
DataFramethat includes all calculated metrics:Parametric bias
Parametric lower and upper limits of agreement
Half-width of the constant limits of agreement around the regression bias line, i.e.
1.96 × SDof the bias-regression residuals (Menghini et al. 2021, eq. 2)Regression intercept and slope for modeled bias
Regression intercept and slope for modeled limits of agreement
Euser et al. (2008) slope for log-transformed limits of agreement (only when
log_transform=True)Lower and upper confidence intervals for all metrics
- Parameters:
- ci_methodstr or None
If
'param'(i.e., parametric), confidence intervals are always represented using a standard t-distribution. If'boot'(i.e., bootstrap), confidence intervals are always represented using a bootstrap resampling procedure. If'auto'(default), confidence intervals are represented using a bootstrap resampling procedure for sleep statistics where the distribution of score differences is non-normal and using a standard t-distribution otherwise. IfNone, no confidence intervals are computed and only the'center'interval is returned. This avoids the (potentially slow) bootstrap procedure entirely.- sleep_statslist or None
List of sleep statistics to include, in the desired row order. Default (None) is to include all sleep statistics. Bootstrapped confidence intervals are only computed for the requested statistics.
Added in version 0.8.0.
- Returns:
- summary
pandas.DataFrame A
DataFrameof numeric bias, limits of agreement, and their confidence intervals for all sleep statistics. Columns form a MultiIndex with levelsvariableandinterval('center','lower','upper').When
log_transform=True, an additionalloa_log_slopevariable holds the Euser (2008) LoA slope (LoA = bias ± slope × ref) and its confidence interval.
- summary