plot_stage_prefphase¶
- plot_stage_prefphase(b, stats, ModelSpec)¶
PLOT_STAGE_PREFPHASE Plot preferred SO phase in N1, N2, and N3 sleep stages
- Usage:
[pp, pp_CI] = plot_stage_prefphase(b, stats, ModelSpec)
- Inputs:
b : 1xM double - fitted model parameters from glmfit – required stats : struct - glmfit stats (covb, …) – required ModelSpec : struct - model specification, must contain stage:SOphase interaction – required
- Outputs:
pp : 3x1 double - preferred phase (rad) for N1, N2, N3 pp_CI : 3x2 double - 95 percent CI for each preferred phase (col 1: lower, col 2: upper)
Notes
Requires stage:SOphase to be in ModelSpec.InteractSelect. The CI is estimated by Monte Carlo sampling (M = 10000) from the coefficient covariance. Accompanies Chen et al., PNAS 2025.
See also: plot_sop_prefphase, specify_mdl, ismember_interaction
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿