Module Expr Str Import alias identifier Import alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad keyword Num keyword Num Assign NameStore Call NameLoad keyword Num keyword Num keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword TupleLoad NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore BinOpMult Num AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore BinOpDiv NameLoad SubscriptLoad NameLoad Index Num Assign NameStore CompareLt SubscriptLoad NameLoad Slice NameLoad Num Assign NameStore Call NameLoad For NameStore ListComp SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr ExtSlice Slice Slice Num Num Slice comprehension NameStore NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Slice Slice Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Index NameLoad keyword Num AugAssignDiv NameStore SubscriptLoad NameLoad ExtSlice Ellipsis Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad Assign NameStore ListLoad Num Num Assign NameStore Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpMult NameLoad NameLoad Print AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore ListLoad Str Str Str For TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num keyword AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad CompareGt NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num keyword Str keyword ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Str FunctionDef arguments args defaults vararg body Return SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num Num keyword NameLoad keyword NameLoad keyword NameLoad Index Num decorator_list Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Num keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareLt NameLoad Num Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad ListLoad NameLoad NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad ListLoad NameLoad NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A 
.. _tut_stats_cluster_sensor_rANOVA_tfr:

====================================================================
Mass-univariate twoway repeated measures ANOVA on single trial power
====================================================================

This script shows how to conduct a mass-univariate repeated measures
ANOVA. As the model to be fitted assumes two fully crossed factors,
we will study the interplay between perceptual modality
(auditory VS visual) and the location of stimulus presentation
(left VS right). Here we use single trials as replications
(subjects) while iterating over time slices plus frequency bands
for to fit our mass-univariate model. For the sake of simplicity we
will confine this analysis to one single channel of which we know
that it exposes a strong induced response. We will then visualize
each effect by creating a corresponding mass-univariate effect
image. We conclude with accounting for multiple comparisons by
performing a permutation clustering test using the ANOVA as
clustering function. The results final will be compared to
multiple comparisons using False Discovery Rate correction.
 N/A numpy np N/A matplotlib.pyplot plt N/A mne mne io mne.time_frequency single_trial_power mne.stats f_threshold_mway_rm f_mway_rm fdr_correction mne.datasets sample N/A __doc__ N/A data_path N/A N/A sample data_path N/A raw_fname N/A data_path /MEG/sample/sample_audvis_raw.fif N/A event_fname N/A data_path /MEG/sample/sample_audvis_raw-eve.fif N/A event_id 1 N/A tmin -0.2 N/A tmax 0.5 N/A raw N/A N/A io read_raw_fif raw_fname N/A events N/A N/A mne read_events event_fname N/A include N/A N/A N/A N/A raw info N/A bads N/A MEG 2443 N/A picks N/A N/A mne pick_types N/A raw info meg grad eeg False eog True stim False include include exclude bads N/A ch_name N/A N/A N/A raw info N/A ch_names N/A N/A picks N/A 0 N/A reject N/A dict grad 4e-10 eog 0.00015 N/A event_id N/A dict aud_l 1 aud_r 2 vis_l 3 vis_r 4 N/A epochs N/A N/A mne Epochs raw events event_id tmin tmax picks picks baseline N/A None 0 reject reject N/A N/A N/A epochs equalize_event_counts event_id copy False N/A times N/A 1000.0 N/A epochs times N/A decim 2 N/A frequencies N/A N/A np arange 7 30 3 N/A sfreq N/A N/A raw info N/A sfreq N/A n_cycles N/A frequencies N/A frequencies N/A 0 N/A baseline_mask N/A N/A times N/A decim 0 N/A epochs_power N/A list N/A condition N/A N/A N/A N/A N/A epochs N/A k get_data N/A N/A N/A 97 98 N/A N/A k event_id N/A N/A this_power N/A single_trial_power condition sfreq sfreq frequencies frequencies n_cycles n_cycles decim decim N/A this_power N/A this_power N/A N/A N/A 0 N/A N/A N/A epochs_baseline N/A N/A np mean N/A this_power N/A N/A N/A N/A baseline_mask axis 2 N/A this_power N/A epochs_baseline N/A N/A N/A N/A np newaxis N/A N/A N/A epochs_power append this_power N/A n_conditions N/A len N/A epochs event_id N/A n_replications N/A N/A N/A N/A epochs events shape N/A 0 n_conditions N/A factor_levels N/A 2 2 N/A effects A*B N/A n_frequencies N/A len frequencies N/A n_times N/A len N/A times N/A decim N/A data N/A N/A np swapaxes N/A N/A np asarray epochs_power 1 0 N/A data N/A N/A data reshape n_replications n_conditions N/A n_frequencies n_times N/A N/A data shape N/A N/A fvals pvals N/A f_mway_rm data factor_levels effects effects N/A effect_labels N/A modality location modality by location N/A N/A effect sig effect_label N/A zip fvals pvals effect_labels N/A N/A N/A N/A plt figure N/A N/A N/A plt imshow N/A N/A effect reshape 8 211 cmap N/A N/A plt cm gray extent N/A N/A times N/A 0 N/A times N/A -1 N/A frequencies N/A 0 N/A frequencies N/A -1 aspect auto origin lower N/A effect N/A N/A N/A np ma masked_array effect N/A N/A sig 0.05 N/A N/A N/A plt imshow N/A N/A effect reshape 8 211 cmap RdBu_r extent N/A N/A times N/A 0 N/A times N/A -1 N/A frequencies N/A 0 N/A frequencies N/A -1 aspect auto origin lower N/A N/A N/A plt colorbar N/A N/A N/A plt xlabel time (ms) N/A N/A N/A plt ylabel Frequency (Hz) N/A N/A N/A plt title N/A Time-locked response for '%s' (%s) N/A effect_label ch_name N/A N/A N/A plt show N/A effects A:B stat_fun N/A N/A N/A args N/A N/A N/A N/A f_mway_rm N/A N/A np swapaxes args 1 0 factor_levels factor_levels effects effects return_pvals False N/A 0 N/A N/A pthresh 1e-05 N/A f_thresh N/A f_threshold_mway_rm n_replications factor_levels effects pthresh N/A tail 1 N/A n_permutations 256 N/A N/A T_obs clusters cluster_p_values h0 N/A N/A N/A mne stats permutation_cluster_test epochs_power stat_fun stat_fun threshold f_thresh tail tail n_jobs 1 n_permutations n_permutations buffer_size None N/A good_clusers N/A N/A N/A np where N/A cluster_p_values 0.05 N/A 0 N/A T_obs_plot N/A N/A N/A np ma masked_array T_obs N/A N/A np invert N/A clusters N/A N/A N/A np squeeze good_clusers N/A N/A N/A plt figure N/A N/A f_image cmap N/A zip N/A T_obs T_obs_plot N/A N/A N/A plt cm gray RdBu_r N/A N/A N/A N/A plt imshow f_image cmap cmap extent N/A N/A times N/A 0 N/A times N/A -1 N/A frequencies N/A 0 N/A frequencies N/A -1 aspect auto origin lower N/A N/A N/A plt xlabel time (ms) N/A N/A N/A plt ylabel Frequency (Hz) N/A N/A N/A plt title N/A Time-locked response for 'modality by location' (%s)
 cluster-level corrected (p <= 0.05) ch_name N/A N/A N/A plt show N/A N/A mask _ N/A fdr_correction N/A pvals N/A 2 N/A T_obs_plot2 N/A N/A N/A np ma masked_array T_obs N/A N/A np invert mask N/A N/A N/A plt figure N/A N/A f_image cmap N/A zip N/A T_obs T_obs_plot2 N/A N/A N/A plt cm gray RdBu_r N/A N/A N/A N/A plt imshow f_image cmap cmap extent N/A N/A times N/A 0 N/A times N/A -1 N/A frequencies N/A 0 N/A frequencies N/A -1 aspect auto origin lower N/A N/A N/A plt xlabel time (ms) N/A N/A N/A plt ylabel Frequency (Hz) N/A N/A N/A plt title N/A Time-locked response for 'modality by location' (%s)
 FDR corrected (p <= 0.05) ch_name N/A N/A N/A plt show