top | previous

Run mris_glm to perform estimation

In order to perform estimation you will first need to change to the tutorial data directory and setup SUBJECTS_DIR:

cd $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorial
setenv SUBJECTS_DIR ${PWD}

Next, create a 'stats' directory (or some other appropriate name) and copy your FSGD file into it:

mkdir stats
cp my_gender_age_fsgd.txt stats/
cd stats

Assuming the FSGD file is properly created, mris_glm needs to be configured on the command line in order to perform estimation. Examples of the command lines for estimating the left hemisphere and then the right hemisphere are given below and a brief explanation follows:

# For the left hemisphere
mris_glm --surfmeas thickness \
         --hemi lh \
         --trgsubj average \
         --fsgd ./my_gender_age_fsgd.txt doss \
         --beta ./beta_doss-thickness-100lh.mgz\
         --var ./var_doss-thickness-100lh.mgz \
         --y ./y_doss-thickness-100lh_000.mgz \
         --nsmooth 100

# For the right hemisphere
mris_glm --surfmeas thickness \
         --hemi rh \
         --trgsubj average \
         --fsgd ./my_gender_age_fsgd.txt doss \
         --beta ./beta_doss-thickness-100rh.mgz \
         --var ./var_doss-thickness-100rh.mgz \
         --y ./y_doss-thickness-100rh_000.mgz \
         --nsmooth 100

In this example, mris_glm will read the thickness maps for each of the subjects, smooth them with 100 iterations of nearest-neighbor smoothing, resample the maps to the common surface space defined by the average subject, convert the FSGD file my_gender_age_fsgd.txt into a design matrix by using doss, and save the regression coefficients (--beta,), noise variance (--var) and the preprocessed data (i.e., the input data after resampling and smoothing) (--y). Note that the preprocessed data can be used as input to other group analysis packages.

Upon completion, check to see that mris_glm wrote the following files in the directory from which it was run by typing:

ls -l beta_doss-thickness-100lh_000.mgz
ls -l var_doss-thickness-100lh.mgz
ls -l y_doss-thickness-100lh_000.mgz

ls -l beta_doss-thickness-100rh_000.mgz
ls -l var_doss-thickness-100rh.mgz
ls -l y_doss-thickness-100rh_000.mgz

in the "stats" directory. The files called beta_doss-thickness-100?h_000.mgz contain the regression weights; files called var_doss-thickness-100?h.mgz contain the noise variance; and files y_doss-thickness-100?h_000.mgz contain the input data after resampling and smoothing, for both hemispheres.

FsTutorial/PerformEstimation (last edited 2011-03-30 16:26:57 by NickSchmansky)