pub fn auto_model(layout: &BidsLayout) -> Result<Vec<Value>>Expand description
Auto-generate a BIDS Stats Model for each task in a dataset.
For each task found in the layout, creates a model with:
- Run level — Factor(trial_type) transformation, GLM with factored trial type columns, and t-test dummy contrasts
- Session level (if multiple sessions) — Meta-analysis pass-through
- Subject level (if multiple subjects) — Meta-analysis pass-through
- Dataset level — Group-level GLM with intercept
Trial types are automatically extracted from _events.tsv files.
§Example
let models = bids_modeling::auto_model(&layout).unwrap();
for model in &models {
println!("{}", serde_json::to_string_pretty(model).unwrap());
}