DegreeAnalysis - michaelandric/steadystate GitHub Wiki

How many connections does this voxel have? That is its "degree."

Steps

I do this analysis in R with the bct package. Typically, I invoke the R code on the command line via a script that sets variables for the code.

1. Do the modularity analysis through step 3

Finding the degree here requires a thresholded connectivity matrix as input.

2. Find the degree for every voxel

Run the fdegrees_und function on a thresholded connectivity matrix. The "f" in "fdegrees_und" designates 'file,' where 'file' is the binary format file (not a text file) output from the threshold function. Sarah originally wrote a version of this function ("degrees_und"?) that takes a text file. The "und" in "fdegrees_und" denotes 'undirected.' My graph is undirected: There either is or is not a connection between any two voxels (given the correlation threshold I choose). If there were connection weights, then it is directed.


Procedural note:

I did the modularity analysis in the individual person space. Every person has a different number of voxels. Before doing the voxel-wise analysis on the group, the data must be brought to group-level space, e.g., Talairach in the volume or common-space meshes on the surface.

_My flow:

  1. I Undumped my degree results for every person into AFNI format.
  2. I transformed those into Talairach space.
  3. I dumped the Talairach-space degree results to text files. These text files are the input for the group-level analysis in the next step._

3. Analyze group-level, voxel-wise degree effect across conditions

The degree values do not follow a normal distribution (quickly tested with Shapiro-Wilk test in R). So, I use a non-parametric repeated measures test. Done with the Friedman test in R.

Group-level, voxel-wise ANOVA and linear tests in AFNI with 3dANOVA2

Done using this script.. The code does a 3dANOVA2. It follows Uri's script (/mnt/tier2/urihas/sam.steadystate/scripts/rhipp.ANOVA.noBARS.corrected.contweight.customME.sh). There are tests for linear increase, U-shape profile, and step-increase. The orthogonal weights account for the Markov entropy in the transitions.

Relevant papers