3dMVM_validator

THIS TUTORIAL IS NOT YET COMPLETE!!!

Overkill [1]

The 3dMVM_validator is a shiny app that can be used to help test a 3dMVM model. It will validate your model before you run 3dMVM to make sure that the model makes some sense. The app also helps with the model and GLT specifications and will generate an output script that can be run from the terminal. Hopefully this will save some time instead of waiting to see if 3dMVM likes your specifications and you spelled everything correctly.

Briefly, here is what will happen when you run 3dMVM_validator -dataTable my_data.csv:

  • afni will launch and display a dataset.

  • The default browser will launch the shiny app and load your data table.

  • Choose a coordinate in an afni window.

  • Extract and load the data from your input data sets.

  • Specify a model and get results instantly.

This should only be used to make sure that the model is specified correctly NOT to test for any kind of significance.

../../_images/baby.jpg

Ready, ready, ready, ready, ready to run. [2]

  1. Make sure AFNI and R are installed and configured correctly. See installation.

  2. Run @afni_R_package_install -shiny to install necessary R libraries.

  3. Prepare a data table of the format required for 3dMVM.

  4. Have your datasets handy.

We gave her everything we owned just to sit at her table. [3]

The only input to 3dMVM_validator is a file containing a table similar to the “-dataTable” input for 3dMVM.

  • The table MUST be saved as a comma, space, or tab separated values file, but can have any extension.

  • The first column header MUST be “Subj”. Spelling and capitalization counts!

  • The last column header MUST be “InputFile”.

    • This column should have a path to your datasets.

    • Relative paths are ok, but for portability sake, full paths are recommended.

    • Subbrik selectors are allowed.

  • The middle columns are what ever variables you have that may go into your model.

    • They can be categorical or quantitative variables.

  • All other rules for 3dMVM -dataTable must be followed as well.

For example:

Subj

treatment

response

Score

InputFile

subj0060

CBT

nonresp

0.4

subj.0060.nii.gz

subj0082

CBT

nonresp

0.5

subj.0082.nii.gz

subj0049

CBT

remit

0.3

subj.0049.nii.gz

subj0076

CBT

remit

0.2

subj.0076.nii.gz

subj0213

Drug

nonresp

0.4

subj.0213.nii.gz

subj0231

Drug

nonresp

0.7

subj.0231.nii.gz

subj0061

Drug

remit

0.8

subj.0061.nii.gz

subj0075

Drug

remit

0.8

subj.0075.nii.gz

Walking in your footsteps. [4]

Start Up

Location location location

There are two ways to select a location from which to extract data.

  1. Single voxel coordinate.

  2. Region of interest sphere.

Any time you change the crosshair location in the afni gui, you will need to push the “Get Coordinate” button again to load the new location. The coordinates are NOT live as in InstaCorr.

Extract the soul from human kind. [5]

Positive Role Model. [6]

By Default by Design. [7]

After loading the data, the default variables are tested as a model. The a summary of the model results is shown below. The text is a print out of the R function that calculates the model (aov_car).

../../_images/3dMVM_validator_specify_01.png

Spelling counts in large amounts. [8]

Start typing a model as you would for the -bsVars argument in 3dMVM. The program will make sure that you are entering a valid model. It will check your spelling and match your text with the variables that are in your data table. The “Specification errors” box will show you want is wrong with the text strings. If the model is valid, the “Model result” box will display a summary. If not, you will see the “Enter a valid model” warning.

../../_images/3dMVM_validator_specify_02.png

Rudie Can’t Fail. [9]

This model shows a failure. The BaselineScore is a numerical variable, but it was not specified as a quantitative variable -qVars. Since it tests the model as you type, you know where the mistake is.

../../_images/3dMVM_validator_specify_fail.png

Specifying the BaselineScore as a -qVars gives a successful model. Gender is also numerical, but it would not be quantitative.

../../_images/3dMVM_validator_specify_success.png

Note

We don’t care about the p value for this model!!! We only want to make sure it doesn’t fail!!!

And my script’s been rearranged. [10]

This tab shows the script that is created as you specify options. Every change and addition you make will be updated live in the script. You can download the finalized script here to run in the terminal.

../../_images/3dMVM_validator_script.png

More coming soon

Footnotes