Skip to content

Compare group rhythms

Question

Which group differences are supported across independent subjects?

See every package-generated example · Read the complete analysis pipeline

When to use

Use this for time-matched rhythm profiles from independent subjects in labelled groups.

Example figure

Compare group rhythms output generated by Circadian Workbench

This deterministic example is calculated by the group_comparison action and drawn by render_group_comparison_svg, the same renderer used for publication export. Empty or withheld elements are therefore visible exactly as they are in a real result.

import circadian_workbench as cw

cw.call("group_comparison", groups=groups)

Required inputs and controls

The public function is the registered action below. settings= is accepted as a friendlier alias for config= by cw.call; the calculation stores the complete normalized config in provenance.

Function reference

cw.call("group_comparison", groups, config=None, alpha=0.05, correction='sidak', unit='subject', sphericity='greenhouse_geisser')

Arguments and parameters

Name Type Required Default Units Meaning
groups object yes — - Recordings grouped by label: {'WT': [spec, ...], 'KO': [...]}.
config object no null - Partial scientific settings. Omitted or None values use the shared installed defaults; invalid fresh values are rejected. Run describe_config for names, meanings, units, bounds and choices. Explicitly load old saved mappings with load_saved_settings to report compatibility conversions.
alpha float no 0.05 - Group-comparison significance threshold.
correction string no "sidak" - sidak, bonferroni, or none.
unit string no "subject" - Unit of analysis: subject, slice, or cell.
sphericity string no "greenhouse_geisser" - greenhouse_geisser, huynh_feldt, or none.

Every nested config key, default, allowed value, and purpose is listed in the complete configuration reference.

How it works

Group, time and interaction effects are tested with repeated measures and pointwise contrasts are corrected.

$$ y\sim\mathrm{group}+\mathrm{time}+\mathrm{group}\times\mathrm{time} $$

Implementation: analysis.py::_group_comparison.

Outputs and interpretation

The result includes effects, corrected pointwise tests, effect sizes and subject counts.

cw.call returns a Result: use .data for calculated values, .warnings for scientific qualifications, .provenance for version and input identity, .script for an equivalent replay script, and .files for saved outputs.

Limitations

The independent unit must be declared correctly; repeated recordings from one subject are not extra subjects.

Example

The figure above is a real package result from a seeded, redistributable synthetic dataset. The flat gallery bundle retains figure_data_group-rhythm-comparison.csv, a standalone plot_group-rhythm-comparison.py, source hashes, an editable SVG, and a rendered preview.

Methods text

Group profiles were compared with the declared repeated-measures model and multiplicity correction.

See also

Compare fitted group rhythms · Compare group peak times · Analysis index · Gallery