Hi Darren
yes, varcopes are estimates of the variance of a cope and are linearly
related to the estimated variance of the residuals - have a look at
e.g. Keith Worsley's chapter on 'Statistical Analysis of Activation
Images' in 'Functional MRI: An Introduction to Methods' for more
details.
cheers
christian
On Sunday, Jul 6, 2003, at 12:53 Europe/London, Darren Schreiber wrote:
>
> I am going to work on digesting the rest of your email. But, I am
> still unclear on the varcope files. Do those give me an estimate on
> the variance of the parameter estimates? Are they similar to standard
> errors?
>
> Any papers that I could look at as examples would be greatly
> appreciated.
>
> Darren
>
> On Saturday, July 5, 2003, at 01:26 AM, Joseph Devlin wrote:
>
>> Hi Darren,
>>
>> Now, my understanding is that each voxel of the cope1.hdr file
>> contains the Beta estimate for the effect of that contrast. So, are
>> the values within groups comparable? Across groups? Is this a
>> measure of activation for the group under the conditions?
>>
>>
>> That's just about right. The cope images actually contain values
>> which are the linear Contrasts Of Parameter Estimates (hence cope).
>> Each parameter estimate is a beta so for a 1 -1 contrast, the cope
>> would be beta(1) - beta(2).
>>
>> THe raw numbers themselves are not actually meaningful and may not be
>> directly comparable across groups (or indeed, across individuals). If
>> the design matrices are all identical across session, subject, and
>> group then yes, the raw numbers should be directly comparable. If
>> there are timing differences or if you model only correct responses
>> or admit any kind of variability like that, then no, they are not
>> compatible. For these values to be meaningful and comparable they
>> really should be converted into percent signal change and this
>> depends on the precise design matrix per session. The following
>> fragment of ksh script will basically do what you want (per session,
>> per subject rather than extracting a single value at the top level).
>> THe advantage here is exactly what Hauke mentioned, namely that you
>> get the distribution rather than a single summary statistic:
>>
>> #!/bin/ksh
>>
>> #
>> # This script retrives the mean parameter estimates from a standard
>> space
>> # ROI and the baseline signal in the whole brain for computing mean
>> # effect sizes in a region.
>> #
>>
>> #
>> # Specify the path for the subject directories
>> #
>> ORIG_PATH=~/scratch
>>
>> #
>> # Specify the subject directories
>> #
>> DIRS="6235 6236 6247 6248 6301 6302 6314 6334 6335 6346 6347 6348"
>>
>> #
>> # Specify the sessions
>> #
>> SESS="session_A+ session_B+"
>>
>> #
>> # Specify the PEs you want to retrieve.
>> #
>> FILES="pe1 pe3 pe5 pe7 pe9 pe11 pe13 pe15"
>>
>> #
>> # Adjust the header to reflect your individual conditions
>> #
>> print "SESSION UNREL FORM MORPH SEM IDENT NON-ID
>> UNR-NON NON BASELINE"
>>
>> #
>> # Specify the anatomical mask of the ROI. The mask should be in
>> standard
>> # space for the following code to work without modification.
>> #
>> MASK=~/masks/left_pars_triangularis
>>
>> #---------------------------------------------------------
>> # Shouldn't need to change anything below this point
>> #----------------------------------------------------------
>> TMP=/tmp/$$
>>
>>
>> for D in $DIRS; do
>> for S in $SESS; do
>> print -n "${D}/${S} "
>>
>> for F in $FILES; do
>> # Put the EPI image into standard space
>> flirt -in $ORIG_PATH/$D/$S.feat/stats/$F \
>> -ref /usr/local/fsl/etc/standard/avg152T1_brain -applyxfm
>> \
>> -init $ORIG_PATH/$D/$S.feat/example_func2standard.xfm \
>> -out $TMP
>>
>> # Mask it and compute the mean PE in the mask
>> avwmaths $TMP -mas $MASK $TMP
>> MEAN=$(avwstats $TMP -M)
>>
>> # Adjust the signal to reflect percent signal change
>> COLUMN=${F#pe}
>> DESIGN=$(awk 'BEGIN { column = '"$COLUMN"' ; mn = 0; mx = 0 } \
>> matrix == 1 { if ($column < mn) mn=$column; \
>> if ($column > mx) mx=$column }\
>> /Matrix/ { matrix = 1 }\
>> END { printf("%0.3f\n", mx-mn ) }'
>> $ORIG_PATH/$D/$S.feat/design.mat)
>> awk 'BEGIN {printf("%0.3f ", '"$MEAN"' * '"$DESIGN"') }'
>> $ORIG_PATH/$D/$S.feat/design.mat
>> done
>>
>> # Finally, compute the baseline signal over the whole brain for
>> this mask.
>> # Normally it is around 10000.
>> print $(avwstats $ORIG_PATH/$D/$S.feat/filtered_func_data -M)
>> done
>> done
>> rm $TMP.img $TMP.hdr
>>
>> A couple points to note. First, this script is specific to parameter
>> estimates -- not copes. The reason is because the pes get adjusted
>> according to the peak height difference in the relevant column of the
>> design matrix which is only meaningful for pes. I'll return to copes
>> in a second.
>>
>> Next, the values themselves still aren't percent signal change. They
>> need to be divided by the final column (which is a value typically
>> around 10000) and then multiplied by 100 to change into a
>> percentage. Once you've done that, it's easy to get cope values.
>> For a (1 -1) contrast I would simply create a new column where I
>> subtract column 2 from column 1 per session, per subject and then
>> compute the mean and standard error mean (or whatever) over the
>> contrast.
>>
>> And just to briefly return to another point Hauke raised -- the
>> negative COPE values. If these really are beta rather than copes,
>> there is nothing intrinsically wrong with negative values as long as
>> you are comparing them and the contrast is positive. If, however,
>> the contrast is negative (and this looks to be the case if the number
>> you provided came from cope images), then you are talking about
>> "deactivations" rather than "activations". If these are copes and
>> you see activation in the amygdala for your contrast of interest,
>> that probably means that your mask is somewhat inconsistent with your
>> region of activation (either much larger or spatially displaced).
>>
>> Hope this is some help.
>>
>>
>>
>> Joe
|