Skip to contents

Running vertex-wise linear mixed effects models in Freesurfer requires a specific file format. The qdec format requires neatly created binary columns for categorical value levels, and is made more efficient if continuous variables are scaled (or de-meaned). This package provides functions to create these files from R.

Installation

You can install the development version of neuromat like so:

# Install Capro R-universe
install.packages('neuromat', 
  repos = 'https://capro-uio.r-universe.dev')

Example

library(neuromat)
cars <- mtcars
cars$cyl <- factor(cars$cyl)
cars$gear <- factor(cars$gear)
qdec <- make_fs_qdec(cars, mpg ~ -1 + cyl + hp)
plot(qdec)