Hi Michael,
Yes, 'stiching' data together is always problematic - see various posts. My suggestion was concatenating only within subject (combining runA and B) and then to run temporal concatenation across these 4D data sets. When you concatenate across runs and subjects I'm not surprised that melodic takes enormeous amounts of time and gives poor results. Well done for getting it to run in the first place with 15GB of men ;)
Wrt your question:
> You suggested combining relevant entries into a single file and to average across groups, but I am uncertain of the underlying file structure and which data to extract. The tXX.txt temporal response files are 302 x 105 each and each z_stat file is 15 x 105. 302 is the number of TRs per run, so that makes sense. And 15 is the number of contrasts requested in the .con file, so that makes sense And 105, I think is the eigenvector of the subsequent columns plus temporal responses for each subject/session (I have 26 subjects * 4 sessions = 104).
Yes, that all sounds right. Now assume that the input order was s1r1 s2r1 .... s26r1 s1r2 ..., that is, all runs 1 first, then all runs 2 etc. You have tested all tXX.txt files against all 4 designs d1-d4 (giving you 216 files). These files you need to collapse down to 54 files. Let's assume you're interested in component 1 (i.e. t1.txt which you tested against designs d1-d4) with output file z_t1d1 ... z_t1d4.
If the input file order is as suggested above then entries 2-27 in z_t1d1 are correct, the remaining columns you can discard (the first omne because its the eigenseries, the others because you're testing against the wrong designs). Similarly, entries 28 to 55 in z_t1d2 are correct and so on. That is, each one of the 4 files give you 26 valid columns and 79 uninteresting columns.
If you collect the correct entries you will have a single file with 15x104 (now ignoring the first eigenvector) per component. You would now collapse across runs, i.e. average 4 chunks of 26 columns (average across runs). You now have 15x26 matrix of effects
> I would like to make sense of each IC in terms of 15 contrasts related to the temporal design of each run (e.g., reward cues vs. loss cues),
The different contrasts are along the rows, so if you get the above right, you can investigate all rows as you wish.
> and I would like to understand differences between 2 groups of subjects (14 adults * 4 runs = 56 inputs; 12 teens * 4 runs = 48 inputs).
Compare the average of the first 14 columns to the average of the remaining 12 columns.
> Could you give an example of how to calculate statistics for the temporal effects and the group effects in the scenario described above? I am conversant with R (and Matlab), so I'm happy to pull out particular rows and columns from the relevant files, but I'm not sure where to start on identifying the correct data and properly aggregating and testing the effects of interest.
>
You seem to be very competent with your shell scripting, the steps above should be fairly straight forward. All of this is working on z-stats which is not great, ideally you'de do this separately on parameter estimates (betas) and variances separately to then generate new t/z-stats at the end.
Does that make sense?
cheers
Christian
|