Dear Kaiming,

how many subjects do you have? only 1? You need to have more data to run a glm (your degrees of freedom is 0 , see error message).

Your other question:
you can select any target for running your analysis. But usually people do not select one of the subjects from the study, because that may introduce a processing bias towards that subject (maybe the thickness changes of that subject will drive the results or bias it). That is why fsaverage is recommended.

Best, Martin

On 01/30/2014 06:13 AM, Kaiming Yin wrote:
Dear Martin,

Yes I think so, and I run the mri_glmfit with fsaverage as the subject like:
mri_glmfit --glmdir lh.thickness.rmanova --y lh.thickness.sm05.mgh --fsgd rmanova.fsgd doss --C tp1-vs-tp2.mtx --C tp1-vs-tp3.mtx --C tp2-vs-tp3.mtx --C tp-effect.mtx --C mean.mtx --surf fsaverage lh

it reports:

FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y    /Freesurfer/k/lh.thickness.sm05.mgh
logyflag 0
usedti  0
FSGD rmanova.fsgd
labelmask  /Freesurfer//fsaverage/label/lh.cortex.label
maskinv 0
glmdir lh.thickness.rmanova
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory lh.thickness.rmanova
Loading y from /Freesurfer/k/lh.thickness.sm05.mgh
INFO: gd2mtx_method is doss
Saving design matrix to lh.thickness.rmanova/Xg.dat
Normalized matrix condition is 1.73205
Matrix condition is 1.73205
Found 149955 points in label.
Pruning voxels by thr: 0.000000
Found 149955 voxels in mask
Saving mask to lh.thickness.rmanova/mask.mgh
Reshaping mriglm->mask...
search space = 74612.965197
DOF = 0
ERROR: DOF = 0


It seems still something wrong was ignored.


Also if I call the preproc or surf2surf commands with the base subject, i.e. k, instead of fsaverage, will it work? or even better? 

mris_preproc --target k --hemi lh  --meas thickness --out lh.thickness.mgh  --fsgd rmanova.fsgd

mri_surf2surf --s k --hemi lh --fwhm 5  --sval lh.thickness.mgh  --tval lh.thickness.sm05.mgh


Thanks,
Kaiming


On Thu, Jan 30, 2014 at 3:18 AM, Martin Reuter <mreuter@nmr.mgh.harvard.edu> wrote:
Your data was probably mapped to fsaverage when you call the preproc or surf2surf commands? If so you should specify fsaverage as the subject nane.
Best Martin


Sent via my smartphone, please excuse brevity.


-------- Original message --------
From: Kaiming Yin
Date:01/29/2014 9:07 PM (GMT-05:00)
To: FreeSurfer Mailing List
Subject: [Freesurfer] Longitudinal RepeatedMeasuresAnova mri_glmfit "--surf subject hemi"

Dear FreeSurfer guys,

I am using longitudinal processing stream and with the RepeatedMeasuresAnova.

my fsgd file is:

GroupDescriptorFile 1
Title k_longitudinal
Class k
Variables  TP1-vs-TP2 TP1-vs-TP3
Input k_1  k      1                1
Input k_2  k     -1                0 
Input k_3  k      0               -1


contrasts is:

tp1-vs-tp2.mtx  tp1-vs-tp3.mtx  tp2-vs-tp3.mtx  tp-effect.mtx  mean.mtx
0 1 0                0 0 1                0 -1 1             0 1 0              1 0 0
                                                                    0 0 1

I run the mris_preproc and mri_surf2surf commands as the same for left hemi thickness,

but when I run the mri_glmfit command it reports "ERROR: you must use '--surface subject hemi' with surface data". if i add the flag as: 
      mri_glmfit ...(as the same before)... --surface k lh
or                                                       --surface k lh thickness
or                                                       --surface k_1.long.k lh
or                                                       --surface k_1.long.k lh thickness
or                                                       --surface k_1 lh
or                                                       --surface k_1 lh thickness
it still goes wrong and even not make an output folder.

Any problems there?

thanks,
Kaiming 

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



-- 
Martin Reuter, Ph.D.
Assistant in Neuroscience - Massachusetts General Hospital
Instructor in Neurology   - Harvard Medical School
MGH / HMS / MIT

A.A.Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, MA 02129

Phone: +1-617-724-5652
Email: 
   mreuter@nmr.mgh.harvard.edu
   reuter@mit.edu
Web  : http://reuter.mit.edu