Hello AFNI experts,
I'm putting together some time series plots overlaying model fits over data, and I was wondering if there was an option in the new 3dDeconvolve (or some other easy way) to selectively regress out the -polort legendre polynomial terms. Using matlab-style notation, here's what I want to do:
y is original data
X is design matrix, X = [P,M] where P are the legendre polynomial column vectors, and M are the model vectors.
b is the parameter vector b = [b_p; b_m], corresponding to the P and M terms above, with their least-squares estimates denoted b_hat, b_p_hat, and b_m_hat, respectively
I would like the generate the following 3d+time data:
y_detrend = y - P*b_p_hat;
fit_detrend = M*b_m_hat;
Can you think of a simple way to do this? The main reason for wanting to do this is to have an alternative visualization of how my fMRI signal model M is fitting the data without getting confused by the signal drifts. Thanks for any advice you might have!
--Patrick