What you want to do
could be done with IM regression using TENT (or CSPLIN) basis functions, and then cutting out the relevant betas for each event in a script, most easily from the
-cbucket output file.
However, it would be simpler (IMHO) to setup the separate model for
correct vs.
error trials and then do standard (non-IM) regression combined with the
-iresp option to get the hemodynamic response function shape datasets for these 2 conditions. (Don't forget the
-TR_times option to refine the time grid used in [-b]-iresp[/b], if it will make your plots nicer.)