mne.stats.erp.compute_sme#

mne.stats.erp.compute_sme(epochs, start=None, stop=None)[source]#

Compute standardized measurement error (SME).

The standardized measurement error [1] can be used as a universal measure of data quality in ERP studies.

Parameters:
epochsmne.Epochs

The epochs containing the data for which to compute the SME.

startint | float | None

Start time (in s) of the time window used for SME computation. If None, use the start of the epoch.

stopint | float | None

Stop time (in s) of the time window used for SME computation. If None, use the end of the epoch.

Returns:
smearray, shape (n_channels,)

SME in given time window for each channel.

Notes

Currently, only the mean value in the given time window is supported, meaning that the resulting SME is only valid in studies which quantify the amplitude of an ERP component as the mean within the time window (as opposed to e.g. the peak, which would require bootstrapping).

References

Examples

Given an Epochs object, the SME for the entire epoch duration can be computed as follows:

>>> compute_sme(epochs)  

However, the SME is best used to estimate the precision of a specific ERP measure, specifically the mean amplitude of an ERP component in a time window of interest. For example, the SME for the mean amplitude of the P3 component in the 300-500 ms time window could be computed as follows:

>>> compute_sme(epochs, start=0.3, stop=0.5)  

Usually, it will be more informative to compute the SME for specific conditions separately. This can be done by selecting the epochs of interest as follows:

>>> compute_sme(epochs["oddball"], 0.3, 0.5)  

Note that the SME will be reported for each channel separately. If you are only interested in a single channel (or a subset of channels), select the channels before computing the SME:

>>> compute_sme(epochs.pick("Pz"), 0.3, 0.5)  

Selecting both conditions and channels is also possible:

>>> compute_sme(epochs["oddball"].pick("Pz"), 0.3, 0.5)  

In any case, the output will be a NumPy array with the SME value for each channel.