regression using 1D files?

Dear AFNI Gurus-

I am asking the following for a friend–

Does any of the AFNI regression functions (3dDeconv, 3dTproject,…) support regression on vectors or matrices (.1D) as well, e.g. ROI-averaged time series?


Is one possible option in appears to be:

-regress_extra_stim_files FILE1 ... : specify extra stim files

                e.g. -regress_extra_stim_files resp.1D cardiac.1D
                e.g. -regress_extra_stim_files regs_of_no_int_*.1D

            Use this option to specify extra files to be applied with the
            -stim_file option in 3dDeconvolve (as opposed to the more usual
            option, -stim_times).

            These files will not be converted to stim_times format.

            Corresponding labels can be given with -regress_extra_stim_labels.

            See also -regress_extra_stim_labels, -regress_ROI, -regress_RONI.

… which also suggests that in 3dDeconvolve, one could use:

-stim_file k sname   sname = filename of kth time series input stimulus
               *N.B.: This option directly inserts a column into the   
                      regression matrix; unless you are using the 'old'
                      method of deconvolution (cf below), you would    
                      normally only use '-stim_file' to insert baseline
                      model components such as motion parameters.

… and in 3dTproject, this might be accomplished with:

-ort f.1D           = Remove each column in f.1D
                       ++ Multiple -ort options are allowed.
                       ++ Each column will have its mean removed.

Does that seem correct, and are there any other things to add?

For the ROI-averaged time series, one should just be able to save that to a 1D file (using, e.g., 3dmaskave), which can then be input, as above?



Most AFNI programs, 3dDeconvolve and 3dTproject included, and take a .1D file (even a single column) as input. 3dDeconvolve even has an explicit -input1D option, though maybe it isn’t really needed. The typical case for this is to use column-based input (time across rows), and to use the transpose operator (') on input, as in:

3dDeconvolve -input epi_average.1D\' ....

In such a case, the -force_TR option is probably needed (since the 1D file does not convey information like a HEAD files does).

  • rick

Rockin’, thanks.