Subject: | | Re: Modelling 2 1:st level contrasts per subject |
From: | | Colin Hawco <[log in to unmask]> |
Reply-To: | | [log in to unmask][log in to unmask] <mailto:[log in to unmask]> > > <mailto:[log in to unmask] <mailto:[log in to unmask]>>>: > > > > Dear Matthieu, > > > > the function you are looking at concerns first level fMRI so > for PET > > 'basic' models, you need to look at > > spm12/config/spm_run_factorial_design.m > > When using proportional scaling global normalisation, the > global scaling > > factor, gSF, is computed l.838 and applied to the data l.855. > > > > Best regards, > > Guillaume. > > > > > > On 18/12/15 15:33, Matthieu Vanhoutte wrote: > > > Dear SPM experts, > > > > > > I have been searching for explicit formula of the global > normalization > > > with proportional scaling as it is used in SPM. I have found > this code > > > in "spm_fmri_spm_ui.m" : > > > > > > /%-Compute Global variate > > > > > > %========================================================================== > > > GM = 100; > > > q = length(VY); > > > g = zeros(q,1); > > > fprintf('%-40s: ','Calculating globals') > > %-# > > > spm_progress_bar('Init',q,'Calculating globals'); > > > if spm_mesh_detect(VY) > > > for i = 1:q > > > dat = spm_data_read(VY(i)); > > > g(i) = mean(dat(~isnan(dat))); > > > spm_progress_bar('Set',i) > > > end > > > else > > > for i = 1:q > > > g(i) = spm_global(VY(i)); > > > spm_progress_bar('Set',i) > > > end > > > end > > > spm_progress_bar('Clear'); > > > fprintf('%30s\n','...done') > > %-# > > > > > > %-Scale if specified (otherwise session specific grand mean > scaling) > > > > > > %-------------------------------------------------------------------------- > > > gSF = GM./g; > > > if strcmpi(SPM.xGX.iGXcalc,'none') > > > for i = 1:nsess > > > gSF(SPM.Sess(i).row) = GM./mean(g(SPM.Sess(i).row)); > > > end > > > end > > > > > > %-Apply gSF to memory-mapped scalefactors to implement scaling > > > > > > %-------------------------------------------------------------------------- > > > for i = 1:q > > > SPM.xY.VY(i).pinfo(1:2,:) = SPM.xY.VY(i).pinfo(1:2,:) * > gSF(i); > > > if spm_mesh_detect(VY) > > > SPM.xY.VY(i).private.private.data{1}.data.scl_slope > = ... > > > > SPM.xY.VY(i).private.private.data{1}.data.scl_slope * > > gSF(i); > > > SPM.xY.…ÿ¦4) |
Date: | | Tue, 19 Jan 2016 10:03:38 -0500 |
Content-Type: | | text/plain |
Parts/Attachments: |
|
|
|
|
It sounds like a lot of your problem comes from the notion that you cannot
model the sessions together because of the number of slices issue. But that
does not follow at all. Your data gets normalized and everyone is moved into
common space, presumably before the statistics are run. This should remove
that issue. I have dealt with data where our MRI tech dynamically changes
slice numbers to get whole brain coverage (not my choice, not my study), and
we never had any problems.
Just make sure you are careful with preprocessing steps and it should be
fine.
Sorry I have never used flexible factorial for group differences so no help
there.
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On
Behalf Of Sandra Tamm
Sent: January-19-16 5:33 AM
To: [log in to unmask]
Subject: [SPM] Modelling 2 1:st level contrasts per subject
Dear SPM-experts,
I have a question regarding an experimental task. We have 2 groups of
subjects (different age) scanned at 2 separate occasions one month apart
with 2 different sleep conditions before the scanning. In the fMRI task, we
have some conditions with 1 specific contrasts of interest. In the beginning
of data collection we changed the scanner sequence and the number of slices
and therefore, some of the subjects have different number (45 or 46) of
slices on their 2 scanning sessions. This, I believe, makes it impossible to
model both sessions together at 1:st level.
I made separate 1:st level models for the 2 sessions with corresponding
contrasts of interest. Now I want to perform 2:nd level analyses and this is
where I come in to trouble.
First of all I want to see the overall effect of the task conditions. The
obvious way would to perform a one sample t test with contrasts from first
level. However, since I have 2 contrasts for each subject (from 2 separate
sessions) I guess I cannot put all the 1:st level contrasts in to one test,
because the contrasts are not independent (since every subject has 2
contrasts). Is there a simple way to handle this? (i.e. modelling the
subjects in a reasonable way).
Secondly, I am interested in both effects of the sleep conditions (i.e.
between sessions), the effect of age group, as well as interaction between
age and sleep condition. The effect of sleep is easy (paired t tests), as
well as the interaction (I used a flexible factorial design), but I read in
earlier emails that it is not valid to test for group differences in the
flexible factorial. Is this true? If yes, is there another way?
Best regards
Sandra
|
|
|
|