specify_mdl¶
- specify_mdl(BinarySelect, InteractSelect, varargin)¶
SPECIFY_MDL Wrap user-provided model specifications into a ModelSpec struct
- Usage:
ModelSpec = specify_mdl(BinarySelect, InteractSelect, ‘Name’, Value, …)
- Inputs:
BinarySelect : 1x4 double - factor selector in fixed order [SOphase, stage, SOpower, history] – required InteractSelect : 1xn cell - interaction terms ‘A:B’ (case- and order-insensitive; : & - accepted) – required
- Name-Value Pairs:
‘hist_choice’ : char - ‘short’ (15 s history, fast) or ‘long’ (90 s history, infraslow structure) (default: ‘short’) ‘control_pt’ : 1xk double - spline control point locations (default: [0:15:90 120 150]) ‘binsize’ : double - point-process bin size in seconds (default: 0.1) ‘hard_cutoffs’ : 1x2 double - spindle frequency cutoffs in Hz (default: [12 16])
- Outputs:
ModelSpec : struct - full model specification used throughout the toolbox
Example
BinarySelect = [1, 1, 0, 1]; InteractSelect = {‘stage:SOphase’}; ModelSpec = specify_mdl(BinarySelect, InteractSelect);
Notes
Accompanies Chen et al., PNAS 2025. Valid interactions are stage:SOphase, SOphase:SOpower, and stage:history.
See also: preprocessToDesignMatrix, build_design_mt, ismember_interaction
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿