Differences between revisions 2 and 3
Deletions are marked like this. Additions are marked like this.
Line 44: Line 44:
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 {{{average7}}} subject, convert the FSGD file {{{my_gender_age_fsgd.txt}}} into a design matrix by using {{{doss}}}, and save the regression coefficients (--beta, bfloat format), noise variance (--var, paint format) and the preprocessed data (i.e., the input data after resampling and smoothing) (--y, bfloat format). Note that the preprocessed data can be used as input to other group analysis packages. 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 {{{average7}}} 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.
Line 48: Line 48:
ls -l beta_doss-thickness-100lh_000.bfloat
ls -l var_doss-thickness-100lh.w
ls -l y_doss-thickness-100lh_000.bfloat
ls -l beta_doss-thickness-100lh_000.mgz
ls -l var_doss-thickness-100lh.mgz
ls -l y_doss-thickness-100lh_000.mgz
Line 52: Line 52:
ls -l beta_doss-thickness-100rh_000.bfloat
ls -l var_doss-thickness-100rh.w
ls -l y_doss-thickness-100rh_000.bfloat
ls -l beta_doss-thickness-100rh_000.mgz
ls -l var_doss-thickness-100rh.mgz
ls -l y_doss-thickness-100rh_000.mgz
Line 57: Line 57:
in the "stats" directory. The files called beta_doss-thickness-100?h_000.bfloat contain the regression weights; files called var_doss-thickness-100?h.w contain the noise variance; and files y_doss-thickness-100?h_000.bfloat contain the input data after resampling and smoothing, for both hemispheres. 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.

[wiki:FsTutorial top] | [wiki:FsTutorial/GroupAnalysis 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 $FREESURFER_HOME/subjects/buckner_public_distribution/FsTutorialDataSet/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 average7 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)