AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
September 05, 2020 01:29PM
Hi gurus!

I've spoken with a few of you about modeling single trial regressors with 3dDeconvolve and the stim_times_IM option for every trial. As an additional test, I'd like to model the trials separately using 3dLSS. I'd like to see how each apporach models single trial betas, before deciding which pipeline to use for a beta series correlation.

I already have the 3dDeconvolve down, however I am a bit unclear on the proper way to set up the design matrix before inputting it to 3dLSS (Even after reading the other message posts).

My major question is:
Can I input the matrix output from 3dDeconvolve (pasted below), where I have more than one stim_times_IM option, directly into 3dLSS? Will 3dLSS take that matrix and select one regressor at a time, while grouping the rest with the other nuisance regressors (and do so for each trial?)

I just want to make sure I do not need to change my 3dDeconvolve command to make unique design matrices for each individual trial. It follows that this would require me to run a 3dDeconvolve and 3dLSS command for each separate trial (i.e. several hundred times), rather than inputting the aforementioned single-trial design matrix and running 3dLSS just once.

My confusion stems greatly from this part of the 3dLSS documentation:
-matrix mmm = Read the matrix 'mmm', which should have been
                output from 3dDeconvolve via the '-x1D' option, and
                should have included exactly one '-stim_times_IM' option.

But as you'll see below in my current 3dDeconvovle call, I have multiple stim_times_IM options, so that I can see which stimulus condition they belong to in the resulting single-trial sub-bricks of the stats file.

Advice on how to set up the Matrix using 3dD would be much appreciated! Because I'm all sorts of confused....

3dDeconvolve -input pb04.$subj.r*.blur+orig.HEAD                            \
    -censor censor_${subj}_combined_2.1D                                    \
    -ortvec mot_demean.r01.1D mot_demean_r01                                \
    -ortvec mot_demean.r02.1D mot_demean_r02                                \
    -ortvec mot_demean.r03.1D mot_demean_r03                                \
    -ortvec mot_demean.r04.1D mot_demean_r04                                \
    -ortvec mot_deriv.r01.1D mot_deriv_r01                                  \
    -ortvec mot_deriv.r02.1D mot_deriv_r02                                  \
    -ortvec mot_deriv.r03.1D mot_deriv_r03                                  \
    -ortvec mot_deriv.r04.1D mot_deriv_r04                                  \
    -polort 4                                                               \
    -local_times                                                            \
    -num_stimts 18                                                          \
    -stim_times_IM 1 stimuli/SR_enc_target_remembered.txt 'BLOCK(3,1)'      \
    -stim_label 1 enc_SR_TH                                                 \
    -stim_times_IM 2 stimuli/SR_enc_target_forgotten.txt 'BLOCK(3,1)'       \
    -stim_label 2 enc_SR_TM                                                 \
    -stim_times_IM 3 stimuli/SR_enc_lure_corrReject.txt 'BLOCK(3,1)'        \
    -stim_label 3 enc_SR_LCR                                                \
    -stim_times_IM 4 stimuli/SR_enc_lure_falseAlarm.txt 'BLOCK(3,1)'        \
    -stim_label 4 enc_SR_LFA                                                \
    -stim_times_IM 5 stimuli/SR_TH.txt 'BLOCK(3,1)'                         \
    -stim_label 5 retr_SR_TH                                                \
    -stim_times_IM 6 stimuli/SR_TM.txt 'BLOCK(3,1)'                         \
    -stim_label 6 retr_SR_TM                                                \
    -stim_times_IM 7 stimuli/SR_LCR.txt 'BLOCK(3,1)'                        \
    -stim_label 7 retr_SR_LCR                                               \
    -stim_times_IM 8 stimuli/SR_LFA.txt 'BLOCK(3,1)'                        \
    -stim_label 8 retr_SR_LFA                                               \
    -stim_times_IM 9 stimuli/OR_enc_target_remembered.txt 'BLOCK(3,1)'      \
    -stim_label 9 enc_OR_TH                                                 \
    -stim_times_IM 10 stimuli/OR_enc_target_forgotten.txt 'BLOCK(3,1)'      \
    -stim_label 10 enc_OR_TM                                                \
    -stim_times_IM 11 stimuli/OR_enc_lure_corrReject.txt 'BLOCK(3,1)'       \
    -stim_label 11 enc_OR_LCR                                               \
    -stim_times_IM 12 stimuli/OR_enc_lure_falseAlarm.txt 'BLOCK(3,1)'       \
    -stim_label 12 enc_OR_LFA                                               \
    -stim_times_IM 13 stimuli/OR_TH.txt 'BLOCK(3,1)'                        \
    -stim_label 13 retr_OR_TH                                               \
    -stim_times_IM 14 stimuli/OR_TM.txt 'BLOCK(3,1)'                        \
    -stim_label 14 retr_OR_TM                                               \
    -stim_times_IM 15 stimuli/OR_LCR.txt 'BLOCK(3,1)'                       \
    -stim_label 15 retr_OR_LCR                                              \
    -stim_times_IM 16 stimuli/OR_LFA.txt 'BLOCK(3,1)'                       \
    -stim_label 16 retr_OR_LFA                                              \
    -stim_times 17 stimuli/phase_instructions.txt 'BLOCK(3,1)'              \
    -stim_label 17 phase_instructions                                       \
    -stim_times 18 stimuli/NoResponse.txt 'BLOCK(3,1)'                      \
    -stim_label 18 NoResponse                                               \
    -GOFORIT 5                                                             \                  \
    -jobs 4                                                                 \
    -fout -tout -x1D X.xmat.1D -xjpeg X.jpg                                 \
    -x1D_uncensored X.nocensor.xmat.1D                                      \
    -fitts fitts.$subj                                                      \
    -errts errts.${subj}                                                    \
    -bucket stats.$subj
Subject Author Posted

3dLSS design matrix input

jyaros September 05, 2020 01:29PM

Re: 3dLSS design matrix input

jyaros September 05, 2020 03:33PM

Re: 3dLSS design matrix input

jyaros September 11, 2020 02:52PM

Re: 3dLSS design matrix input

evansorenson August 23, 2021 01:43PM

Re: 3dLSS design matrix input

gang August 26, 2021 08:09AM