BIDS Stats Models Specification#

Editors:

Alejandro de la Vega (University of Texas at Austin)

Christopher J Markiewicz (Stanford University)


This document contains specifications for writing BIDS Stats Models, a recipe for fitting hierarchical statistical models to neuroimaging datasets. This specification was developed in the Brain Imaging Data Structure (BIDS) community as BIDS Extension Proposal (BEP) 2.

The components of this specification interact, and it is difficult to discuss one structure without referencing others. Therefore this document makes no attempt to introduce all concepts before referring to them. For a more graduated introduction of these concepts, please refer to the Walkthrough.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

Status of this document#

The previously released version of this specification was 1.0.0rc0.

On-disk layout#

BIDS Stats Models are JSON (RFC8259) documents containing the following fields:

An example top-level structure has the form:

{
  "Name": "my_first_model",
  "BIDSModelVersion": "1.0",
  "Input": {
    "task": "motor"
  },
  "Description": "My first BIDS model: a simple 2-condition contrast.",
  "Nodes": [
    {
      "Level": "Run",
      ...
    },
    {
      "Level": "Session",
      ...
    },
    {
      "Level": "Subject",
      ...
    },
    {
      "Level": "Dataset",
      ...
    }
  ],
  "Edges": [
    ...
  ]
}

Execution Graph and Data Flow#

Nodes and Edges#

GroupBy and Filter#

Estimation Nodes#

Model#

Contrasts#

Variable model and transformations protocol#