Hi.
Good - so in each <person>.gfeat/stats directory you will have a set of
fixed and random effects Z stat images, already in standard space, called
fixed1.hdr etc.
In order to carry out third-level analysis, in a fixed-effects framework,
you now need to combine these Z stat images. (Several groups are currently
working on how to make fully general second-level and higher-level GLM
analyses for fixed AND random effects - to date this hasn't yet been
properly solved.)
So - to do this, you can simply combine your Zstat images using avwmaths
for a simplified third-level fixed-effects analysis:
Zdiff = GroupA_Sum(Zfixed) - GroupB_Sum(Zfixed)
---------------------------------------
sqrt(Na+Nb)
EG for your case you want something like (this is for contrast 1 - if you
wanted to look at contrast 2 then use fixed2):
avwmaths <person1_groupA>.gfeat/stats/fixed1 -add \
<person2_groupA>.gfeat/stats/fixed1 -add \
<person3_groupA>.gfeat/stats/fixed1 -add \
<person4_groupA>.gfeat/stats/fixed1 -add \
<person5_groupA>.gfeat/stats/fixed1 -add \
<person6_groupA>.gfeat/stats/fixed1 \
-div 2.45 ZgroupA
avwmaths <person1_groupB>.gfeat/stats/fixed1 -add \
<person2_groupB>.gfeat/stats/fixed1 -add \
<person3_groupB>.gfeat/stats/fixed1 -add \
<person4_groupB>.gfeat/stats/fixed1 -add \
<person5_groupB>.gfeat/stats/fixed1 -add \
<person6_groupB>.gfeat/stats/fixed1 \
-div 2.45 ZgroupB
this gives group Z images for the groups separately and then
avwmaths ZgroupA -sub ZgroupB -div 1.41 ZgroupA-B
this gives a Z for group A minus group B.
If you want to do inference and rendering on the basis of this final Z
image then you can use the attached script thresh_render
chmod a+x thresh_render
then something like
thresh_render ZgroupA-B ${FSLDIR}/etc/standard/avg152T1_brain_mask \
2.3 0.05 ${FSLDIR}/etc/standard/avg152T1 thresh_ZgroupA-B
Hope this works!
Steve.
Xavier Chitnis wrote:
> I combined the three sessions for each subject using FEAT group
> statistics - three input volumes per subject, registration & group stats
> (a single group for each subject)
> >> I have processed our subjects for this experiment to the point of having
> >> combined the three sessions for each subject. We have two groups of subjects
> >> (n=6 in each); what would be the best way of proceeding to a group
> >> comparison?
#!/bin/sh
Usage() {
echo "Usage: thresh_render <raw_zstat> <brain_mask> <z_thresh> <prob_thresh> <background> <output_root>"
echo "e.g.: thresh_render stats/zstat1 mask 2.3 0.01 example_func grot"
exit
}
[ "$1" = "" ] && Usage
[ "$6" = "" ] && Usage
# estimate image smoothness
SM=`${FSLDIR}/bin/smoothest -z $1 -m $2`
DLH=`echo $SM | awk '{print $2}'`
VOLUME=`echo $SM | awk '{print $4}'`
RESELS=`echo $SM | awk '{print $6}'`
#echo "$DLH $VOLUME $RESELS"
# run clustering
${FSLDIR}/bin/cluster -i $1 -t $3 -p $4 --volume=$VOLUME -d $DLH -o cluster_mask_$6 --othresh=thresh_$6 > cluster_$6.txt
# colour rendering
MAX=`${FSLDIR}/bin/avwstats thresh_$6 -R | awk '{print $2}'`
${FSLDIR}/bin/overlay 1 0 $5 -a thresh_$6 $3 $MAX Rendered_thresh_$6
${FSLDIR}/bin/slicer Rendered_thresh_$6 -A 750 Rendered_thresh_$6.ppm
${FSLDIR}/bin/convert Rendered_thresh_$6.ppm Rendered_thresh_$6.gif
/bin/rm Rendered_thresh_$6.ppm
|