How do we get the first eigenvariate values out of a ROI timeseries instead of the average value?
3dpc is the program for that:
Using “-pcsave …” determines how many are output.
So in my case I want to use 3dROIstats for selecting a articular ROI(in my case its amygdala)
and instead of taking an average time series estimate I want to get the first eigenvariate. So, in the 3dc function what is the input
that I should provide. (The confusion is because the documentation says the input needs to be a 1D file)
Let’s say you have an atlas or ROI map DSET_ROI where the amygdala is defined wherever that dataset has a value 4, and it could also have a label attached like “Amygdala”. You can use the “-mask …” option and sub-range selector to focus on just that ROI and its time series:
… getting its eigenvectors (=PCs).
For example, if you have DSET_4D as your time series dataset, then this might be one option, using sub-range selection:
3dpc -dmean -nscale -pcsave 1 -float -mask DSET_ROI"<4>" -prefix OUTPUT DSET_4D
or, if “3dinfo -is_atlas_or_labeltable DSET_ROI” outputs a 1 and, as noted above, there is a label “Amygdala” associated with the ROI with value=4, then:
3dpc -dmean -nscale -pcsave 1 -float -mask DSET_ROI"<Amygdala>" -prefix OUTPUT DSET_4D
should produce the same output.
To get the eigenvectors/PCs from the ROI, you would not want to first collapse the time series within that dset to an average. That would remove the ability to decompose the time series into PCs.
Thanks for the prompt reply, and helping me with the issue.
So the output for the same that I get for the analysis is attached.
I guess the the vec file (fourth in the list) is the one that stores the first eigenvariate values. Also, the values stored by the second file
is similar to the vec file.
Do let me know, if I am missing out something.
Also, is the -dmean option necessary ? As I have already performed Intensity scaling as art of my fMRI pre-processing.
There is also program 3dmaskSVD.
And the related (slower) programs 3dLocalPV and 3dLocalSVD – which give you the eigenvector(s) of the time series from a neighborhood around each voxel.