hello Cyril, SPM-ers,
i think i've figured out partially why the values in the beta-map are so much lower than the values in (ground truth) activation map that i use to generate the time-series. this may even be a problem with the code attached below - i did not run it through spm, to cross check.
i create the time-series by convolving a unit-height impulse train with the hrf. in spm, on the other hand, the regressor is created by convolving the hrf with the stimulus impulse train of height = 1/dt (spm_get_ons.m, line 233), where dt=0.125 is the time-bin in seconds. therefore, the spm regressor results in a beta-map of values much lower than those used to generate the time-series. changing the number of time-bins so that dt=1 fixes this, and now the beta-map shows a value of ~20 where i'm expecting values of 100.
the other issue, i found out, is the generation of the hrf itself. when i create my time-series, i use spm_hrf(0.1) - i.e. when generating the time-series i use a 0.1s sampling interval and then down-sample further to TR=2s. but when creating the regressors, spm uses spm_hrf(dt), with dt=1. these result two hrfs are different (with different amplitudes - because the hrf is normalized to sum to 1). changing my sampling rate to 1s eliminates this.
but after this - the beta values are still too low by a factor of 2. (i.e. i expect a result of 100, spm gives me a beta-map of ~60).
any ideas about where this further loss may be happening ?
thanks,
-firdaus
> -----Original Message-----
> From: cyril pernet [mailto:[log in to unmask]]
> Sent: Thursday, August 21, 2008 06:38
> To: firdaus.janoos
> Subject: Re: [SPM] Question about Beta maps
>
> firdaus.janoos wrote:
> > Hi Cyril,
> > Thanks for your reply. Some follow-up q's:
> >
> >
> > I create the simulated data by convolving a regularly spaced impulse
> train (delta's spaced at 4s) with the hrf and then modulating it with a 3D
> activation map (alternating pattern of 100 and 0 valued voxels),
> I'm not sure to get that ... why don't you create a time series of
> spaced impulses with 0s and some value and convolve this? this will give
> you the time series you want, i.e. alternating periods of
> activation/rest scaled up to 100 depending on the hrf parameters and
> initial values of the impulses - then you can add the kind of noise and
> drift you want on the top of it.
>
> [hrf,p] = spm_hrf(1);
> time=zeros(1000,1);
> time(10:170)=87;
> time(300:460)=87;
> time(600:760)=87;
> data = conv(time,hrf);
> noise = randn(size(data,1),1);
> data = data+noise;
> plot(data);
>
>
> > and then adding noise to the result. The noise std-dev is really low -
> just high enough so that SPM does not give a "divide-by-zero" error when
> computing the t-scores. Then at each voxel I add an offset of 200 - to deal
> with the fact that SPM performs some kind of global normalization and
> thresholding.
> >
> I don't think the offset is the problem since it is somehow removed by
> the normalization
> > The algorithm for normalization seems to be
> > 1) compute a global mean
> > 2) discard all voxels with intensity < global_mean/8
> > 3) recomputed the new global mean and normalize wrt to this.
> >
> yep something like that; the /8 is a bit empirical but seem to work ..
> what you can do is to specify in spm that you want to normalize to 100
> ?? did you try this? it may help
> >
> >>> Also if I examine the beta_0001 image, corresponding to the stimulus
> >>> regressor, the values vary between 1-10 (while the original map was
> >>>
> >> 0/100),
> >>
> >>> and while the shape of the high-intensity region is approximately
> >>>
> >> correct,
> >>
> >>> it is fairly blurred.
> >>> Given that I'm not smoothing my data-sets or doing any other kind of
> >>> pre-processing why do I observe these effects. Also, why doesn't the
> beta
> >>> map reflect the original intensity of the activation pattern ?
> >>>
> >> here I've an idea :-)
> >> your model is y=BX+e with X standing for your on/off 'activation'
> pattern
> >> and the grand mean ; therefore on non simulated data for a voxel you
> would
> >> look at variations + or - around the grand mean 50 ; since you convolved
> >> the data this value isn't 50 anymore
> >>
> >
> > I'm not sure I totally understand what you are saying, but do you think
> the global-normalization is the cause of the problem?
> > Also - there is a further offset of 200 (a background value, to speak) -
> so the grand mean would be approx 200.
> >
> >
> >> in addiiotn to this there is the normalization factor ; what did you
> choose
> >> when you set up your model? for instance the grand mean overall voxels
> i.e.
> >> 6300 voxels at 0 + 1000 voxels at various values up to 100 (the hrf)
> would
> >> give a grand mean of maybe 1.7 or so. Again this will change the values
> of
> >> betas. Note that the ratio between the two regressors, if you modeled
> the
> >> on and off, should be closer to what you expect.
> >> I can see different possibilities for the values you obtain ; but none
> of
> >> them would account for activation outside your area ..
> >> hope this helps
> >>
> >
> > I don't have two regressors - just one regressor modulated with values of
> 100 and 0. So comparing the ratio is not really feasible.
> > Would it be better to use two regressors modeling two orthogonal
> conditions, rather than one regressor modeling a single condition with and
> without activation ?
> >
> one regressor is fine ..
> here you try by yourself a bit of glm on on voxel to see how it looks ..
> from the data above
>
> X = [data-10, ones(length(data),1)]; % design matrix
> imagesc(zscore(X)); colormap('gray'); % also like in spm
> % model is new_data = X.Betas+e
> Betas_test = inv((X'*X))*X'*data; % it gives 1 and 10 - 10 is the grand
> mean
> Betas_test = inv((X'*X))*X'*new_data; % note here I used the inv since
> we have only 1 regressors ; spm uses pinv for rank deficient coding
>
> so now we know that spm normalize the data using an over all voxel grand
> mean and this must be why you got strange values
> I would try with an image in which everywhere I have the same activation
> pattern to see the result then compare with a region with activation
> surrounded by 0s - tis should help you to understand what is happening
>
> tell me if it helps
>
> cyril
>
>
> --
> Dr Cyril Pernet,
> fMRI Lead Researcher SINAPSE
> SFC Brain Imaging Research Center
> Division of Clinical Neurosciences
> University of Edinburgh
> Western General Hospital
> Crewe Road
> Edinburgh
> EH4 2XU
> Scotland, UK
>
> [log in to unmask]
> tel: +44(0)1315373661
> http://www.sbirc.ed.ac.uk/cyril
> http://www.sinapse.ac.uk/
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
|