Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-13 Thread Joseph Dien
After a long break, back to this…

My goal is still to get the betas for the first and maybe second spm hrf so I 
can calculate a Calhoun derivative boost measure.

As a first step I ran:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc

to use the SPM HRF with one derivative.

Then:

selxavg3-sess -sf sessidlistALL.dat -analysis RPA.sm05.lh

I got the following error:

ERROR: flac_evconw(): conVinc, Condition01 evrw dim mismatch
This condition has 2 regressors, but evrm has 1
Struct contents reference from a non-struct array object.

Error in flac_conmat (line 37)
if(nthcon > length(flac.con))

Error in flac_customize (line 369)
  flacnew = flac_conmat(flacnew,nthcon);

Error in fast_selxavg3 (line 65)
flac0 = flac_customize(flac0);
 
>> --
ERROR: fast_selxavg3() failed\n

This ran fine with spmhrf 0

based on your prior response below that:

"This is what happens. If you want to use the derivatives, 
then you need to spec -setwdelay. When you run the command, it will prompt you
for 3 values to use. If you spec 1 0 0, then it will be the same as the
default. If you want to test only the first derivative, then you would spec 0 1 
0. Note that the 3rd regressor is the 2nd derivative wrt time, not the first 
derivative wrt the dispersion parameter. You
cannot get the Calhoun 2004 value using a contrast (it is non-linear).”

I tried:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc -setwdelay

but I just got the error:

ERROR: Flag -setwdelay unrecognized.

I also tried using the flag when setting up the contrasts but that didn’t work 
either.

so not quite sure what I’m doing wrong.  I had understood from your response 
below that the contrast weights didn’t need to be changed from the spmhrf 0 
case but perhaps I misunderstood?

any help would be welcome!

Joe

> On Jul 10, 2013, at 13:58, Douglas N Greve  wrote:
> 
> 
> I was just thinking you could load the beta into matlab, make the 
> Calhoun computations on each condition, then compute the contrasts, then 
> write out the new volume
> 
> 
> On 07/10/2013 01:40 PM, Joseph Dien wrote:
>> Sounds good!
>> 
>> Regarding creating a new volume and computing contrasts from it, what 
>> do you mean?  I didn't follow that.
>> 
>> Thanks!
>> 
>> Joe
>> 
>> 
>> On Jul 10, 2013, at 1:33 PM, Douglas N Greve 
>>  
>> >> wrote:
>> 
>>> 
>>> On 07/10/2013 01:29 PM, Joseph Dien wrote:
 Sorry, not following what you are suggesting?
 
 I want the second derivative for calculating the Calhoun et al 2004
 derivative boost measure.
 My understanding is that to the extent that the BOLD signal deviates
 from the canonical hrf, the amplitude of the primary regressor will be
 attenuated and the variance will instead end up in the first and
 second derivatives (to the extent that they are able to accommodate
 the divergence).  By using a Calhoun measure that incorporates both
 the first and second derivatives, in principle I'll have a BOLD
 measure that is more robust to deviations from the canonical hrf.
>>> Sorry, it had been a while since I read that paper. I did not know that
>>> they had a formulation that included the 2nd derivative.
 
 However, if the way FSFAST is calculating the second derivative
 regressor is resulting in loss of statistical power due to shared
 variance with the primary regressor, then it would be best to just not
 include it at all in the estimation step.
>>> I don't know how much it will hurt the power. You'd have to look at the
>>> efficiency.
>>> doug
>>> 
 
 
 On Jul 10, 2013, at 1:21 PM, Douglas N Greve
  
 > 
 >> 
 wrote:
 
> 
> Why not just create a new volume and then compute contrasts from 
> the new
> volume? What you are suggesting will work I think, but it leaves me a
> little nervous. The p-values will be meaningless.
> 
> 
> As for the 2nd derivative, I think it must be a numerical issue (it is
> not computed analytically). Why do you need the 2nd derivative?
> 
> doug
> 
> 
> 
> On 07/10/2013 12:47 PM, Joseph Dien wrote:
>> I'm thinking of generating a modified beta.nii.gz file where the
>> 

[Freesurfer] mri_glmfit-sim

2016-03-13 Thread John Anderson
Hi experts,

I am trying to correct the results of groups analysis using mri_glmfit-sim

the command is :

mri_glmfit-sim --glmdir lh_10mm --cache 3 pos --cwpvalthresh .0166

I receive the follwoing error :

 

ERROR: cannot find /usr/local/freesurfer/stable6/average/mult-comp-cor/fsaverage/lh/cortex/fwhm35/pos/th30/mc-z.csd

 

Thanks you for any suggestion!

 

 

Bests,
John 
___
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.