Hello Doug, 
It worked. The issue was due to formatting error with the aparc file. Also, I was trying to visualize the result on the surface using freeview -f fsaverage/lh.pial -viewport 3d (clicking overlay on freeview and loading the sig.mgh). However, i got an error " failed to display overlay". How can I visualize the result? Thanks
Best, 
Paul 

On Tue, Apr 18, 2017 at 10:03 PM, Douglas Greve <greve@nmr.mgh.harvard.edu> wrote:

You have a table of data, so no template is needed. If you put the --surf before the --table, it probably runs, but it will ignore the surface


On 4/18/17 9:58 PM, miracooloz@gmail.com wrote:
Thanks doug. Does it mean when using the --table flag, you can't use the fsaverage template? I came across several post in the forum that used "--surf fsaverage lh "‎ and it worked. 
Best, 
Paul

Sent from my BlackBerry 10 smartphone.
From: Douglas Greve
Sent: Tuesday, April 18, 2017 9:52 PM
Reply To: Freesurfer support list
Subject: Re: [Freesurfer] mri_glmfit error with aparc table flag

Don't include --surf fsaverage lh. It thinks the input is a surface, not a table



On 4/18/17 9:21 PM, miracle ozzoude wrote:
Hello freesurfer, 
I am trying to run mri_glmfit with the --table flag. My aparc_lh_thick_stats.txt contain entorhinal and parahippocampal thickness values for 32 subjects. I ran the glm command and received an error. Please, how can i solve this issue? I have included my command, fsgd file, contrast matrix and error below. Thanks 
Best, 
Paul

GLM command: mri_glmfit --table aparc_lh_thick_stats.txt --fsgd age.fsgd --C age1.mtx --C age2.mtx --surf fsaverage lh --cortex --glmdir lh.thickness.glmdir


ERROR= "gdfRead(): reading age.fsgd

INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.

Continuous Variable Means (all subjects)

0 Age 39.9375 17.3312

Class Means of each Continuous Variable

1 Group1  35.6316 

2 Group2  46.2308 

INFO: gd2mtx_method is dods

Reading source surface /Users/MiracleOz/Documents/improvervsdeclinermri/fsaverage/surf/lh.white

Number of vertices 163842

Number of faces    327680

Total area         65416.984375

AvgVtxArea       0.399269

AvgVtxDist       0.721953

StdVtxDist       0.195470


$Id: mri_glmfit.c,v 1.241.2.4 2016/12/08 22:02:40 zkaufman Exp $

cwd /Users/MiracleOz/Documents/improvervsdeclinermri

cmdline mri_glmfit.bin --table aparc_lh_thick_stats.txt --fsgd age.fsgd --C age1.mtx --C age2.mtx --surf fsaverage lh --cortex --glmdir lh.thickness.glmdir 

sysname  Darwin

hostname MacBook-Pro.local

machine  x86_64

user     MiracleOz

FixVertexAreaFlag = 1

UseMaskWithSmoothing     1

OneSampleGroupMean 0

y    /Users/MiracleOz/Documents/improvervsdeclinermri/aparc_lh_thick_stats.txt

logyflag 0

usedti  0

FSGD age.fsgd

labelmask  /Users/MiracleOz/Documents/improvervsdeclinermri/fsaverage/label/lh.cortex.label

maskinv 0

glmdir lh.thickness.glmdir

IllCondOK 0

ReScaleX 1

DoFFx 0

Creating output directory lh.thickness.glmdir

Loading y from /Users/MiracleOz/Documents/improvervsdeclinermri/aparc_lh_thick_stats.txt

Found 66 data colums

Found 0 data rows

INFO: gd2mtx_method is dods

Saving design matrix to lh.thickness.glmdir/Xg.dat

Computing normalized matrix

Normalized matrix condition is 32.2165

Matrix condition is 20734.7

Found 149955 points in label.

ERROR: mri_reshape: number of elements cannot change

  nv1 = 163842, nv1 = 66

search space = 82219.962936

ERROR: dimension mismatch between y and X.

  y has 0 inputs, X has 32 rows." 

FSGD file: GroupDescriptorFile 1

Title MOT

Class Group1

Class Group2

Variables Age

Input 01053p Group1 23

Input 01054p Group1 43

Input 01061p Group2 39

Input 01062p Group2 19

Input 01074p Group2 28

.............. (I have more participants)


CONTRAST MATRIX: 1 -1 0 0 



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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.