3dDeconvolve + 3dLSS for each stimulus to compute beta values

Hi AFNI Guru,

I used a fast event related experiment design and showed 64 images in each run, and in total there were 6 runs. I have come across the paper by Mumford (2012) when I searching the best way to evaluate beta values for each of my 64 images. In the paper, they suggested using a LSS, which could be handled by 3dDeconvolve + 3dLSS. I have read the help for 3dLSS and searched in the forum for a example how to use this approach. I believe I have to do the 3dDeconvolve + 3dLSS 64 times? The code I’m planning to use is as following. Thank you guys so much!

3dDeconvolve -input pb04.$subj.r*.scale+orig.HEAD
-censor censor_$subj_combined_2.1D
-polort A -float
-num_stimts 2
-stim_times_IM 1 img1.txt ‘BLOCK(1, 1)’
-stim_label 1 Image_01
-fout -tout -x1D X.xmat.1D -xjpeg X.jpg
-x1D_uncensored X.nocensor.xmat.1D
-fitts fitts.$subj
-errts errts.$subj
-cbucket all_betas.$subj
-bucket stats.$subj

3dLSS -verb -nodata -matrix X.xmat.1D -prefix img1_LSSout -save1D X.LSS.1D


You don’t have to run 3dDeconvolve 64 times. The stim_times_IM option in 3dDeconvolve will generate one regressor per trial (i.e. single trial). Check the design matrix with 1dplot or look at the X.jpg image (note you have written X…jpg with two dots). Then, 3dLSS will estimate the betas for each single trial via Ridge Regression as recommended in Mumford’s paper instead of the standard Ordinary Least Squares

Btw, I think your 3dDeconvolve should indicate -num_stimts 2 since you are only including one type of stimuli.

Hope this helps,

Thank you so much Cesar! I did include -num_stimts 2 in my 3dDeconvovle. But if you are saying I just need 1 glm with 64 regressors of interests, shouldn’t I change it to -num_stimts 64 instead of 2?

Thank you!