Group level ERF regression

External Email - Use Caution

Hi all,
I'd like to carry out single-trial regression using linear_regression python function to evaluate effect of continuous variable on ERFs. The following gist yields the desired output for a single subject:

n_obs = len(epochs)
intercept = np.ones((n_obs, 1))
# Design matrix for continuous covariate
regressor = np.linspace(8, 66, n_obs)
dmat = np.concatenate((regressor[:, np.newaxis], intercept), axis=1)
# regression between ERF & covariate
res = linear_regression(epochs, design_matrix=dmat, names=names)
But it's not clear to me what to do with the resulting mne.Evoked objects containing beta values, to describe the regression results across a group of subjects. E.g. does it make sense to average the evoked (beta) objects across the group? and if so how do I derive the t-values? Thanks in advance.

Kambiz Tavabi PhD
ktavabi at uw.edu (mailto:ktavabi at uw.edu)
206-685-6173 (tel:206-685-6173)
?Institute for Learning & Brain Sciences
1715 Columbia Road N Portage Bay Building
Box 357988
University of Washington
Seattle, WA 98195-7988 (https://maps.google.com/?q=​Institute%20for%20Learning%20%26%20Brain%20Sciences%201715%20Columbia%20Road%20N%20Portage%20Bay%20Building%20Box%20357988%20University%20of%20Washington%20Seattle%2C%20WA%2098195-7988%20T)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190903/3943daba/attachment.html

External Email - Use Caution

For most purposes, you can treat the coefficients from a linear model just like normal ERPs (Which would correspond to coefficients from an intercept-only model run on the subset of epochs). For an explanation, see eg Smith & Kutas 201x psychophysiology.