When I digged into brainstorm's git page, I found that Residual variance is computed as
sum(d1-d2).^2./ sum( d1.^2)
for example, if I want to calculate the goodness of fit of my simulated EEG recording with the actual recording, what is my d1 and d2.
Is d1 the actual recording, and d2 the simulated recording? or vice versa?