How can I get a new design matrx after running tseriesinterp.m #120
-
after running tseriesinterp.m I've got 4 new timeseries (tcs_interp) for all four conditions each run. But how can I code a new design matrix? with which function or toolbox? It is written in GLMSingle Doc that and should have the same number of runs, the same number of time points. But after running tseriesinterp.m the time points of does not match the time poinst of anymore. Is that mean that I should resample my fmri data too? thank you in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, you should prepare a design matrix that reflects the new sampling rate of your data. If you did a simple integer upsampling of your data rate, perhaps do something like insert a row(s) of zeros after every row of your original design matrix? Like, [1 0 0] becomes [1 0 0 0 0 0 ] |
Beta Was this translation helpful? Give feedback.
-
The tcs_interp output presumably is your fMRI data that has been upsampled. (In theory you can also use it to adjust slice timing differences.) Yes, the design matrix should be upsampled too (though you should not just blindly upsample it using tseriesinterp.m unless you know what you are doing (e.g. use nearest neighbor interpolation)). Then, with a proper design matrix and a proper upsampled time series, you can call GLMestimatesingletrial.m |
Beta Was this translation helpful? Give feedback.
Yes, you should prepare a design matrix that reflects the new sampling rate of your data.
If you did a simple integer upsampling of your data rate, perhaps do something like insert a row(s) of zeros after every row of your original design matrix?
Like, [1 0 0] becomes [1 0 0 0 0 0 ]