Dear all,
I’m trying to extract percent signal change for all events (conditions) in my fmri design from each significant ROI. My first level design has 5 conditions:
1. Condition: Fixation (duration: 3 seconds)
2. Condition: Cue (duration: 3 seconds)
3. Condition: Decision (duration: 3 seconds)
4. Condition: Outcome (duration: 3 seconds)
5. Condition: Feedback (duration: 6 seconds)
I created the following script. What should I enter the duration value in this script? When duration value is 0, what does it means? How to set the duration value in flexible condition duration?
spm_name = '/my/path/SPM.mat';
roi_file = '/my/path/my_roi.mat';
% Make marsbar design object
D = mardo(spm_name);
% Make marsbar ROI object
R = maroi(roi_file);
% Fetch data into marsbar data object
Y = get_marsy(R, D, 'mean');
% Get contrasts from original design
xCon = get_contrasts(D);
% Estimate design on ROI data
E = estimate(D, Y);
% Put contrasts from original design back into design object
E = set_contrasts(E, xCon);
% get design betas
b = betas(E);
% get stats and stuff for all contrasts into statistics structure
marsS = compute_contrasts(E, 1:length(xCon));
% Get definitions of all events in model
[e_specs, e_names] = event_specs(E);
n_events = size(e_specs, 2);
dur = 0;
% Return percent signal esimate for all events in design
for e_s = 1:n_events
pct_ev(e_s) = event_signal(E, e_specs(:,e_s), dur);
end
Gözde
|