These are the scripts for the paper "Exploring Self-Paced Embodiable Neurofeedback for Post-stroke Motor Rehabilitation." Please cite it, if you use code from this repository.
Spychala, N., Debener, S., Bongartz, E., Müller, H. H. O., Philipsen, A., Thorne, J., & Braun, N. (2019). Exploring Self-Paced Embodiable Neurofeedback for Post- Stroke Motor Rehabilitation. Frontiers in Neuroscience.
Scripts used for experiments, need to be run in the given order:
-
TRAIN.m
script for the training block,
required packages/files:- BCILAB-1.1
- lsl_loadlib.m
- lsl_outlet.m
- lsl_streaminfo.m
-
onlineAnalysisMultipleClassifier.m
script for training a predictive model and deriving training accuracies for the training block,
required packages/files:- BCILAB-1.1
- eeglab13_4_4b
-
runClassifier.m
script for loading the trained model for the training block,
required packages/files:- BCILAB-1.1
- BCILAB-1.1
-
runFSA.m
script for ensemble-classification algorithm in the feedback bock,
required packages/files:- BCILAB-1.1
- BCILAB-1.1
Scripts used for analysis after experiments (scripts of each subsection run independently, except for "Data aggregation & boxplots" and "Statistical testing," which require that scripts of all other subsections have run before):
Scripts need to be run in the given order.
-
preprocessingICA.m
script for conducting ICA on data from training block,
required packages/files:- eeglab13_4_4b
- eeg_load_xdf.m (eeglab plugin)
- pop_firws.m (eeglab plugin)
- niclas_mobile24_proper_labels.elp (should be contained in auxiliaries)
-
selectionCSP.m
script for calculating CSP filters on data from training block,
required packages/files:- eeglab13_4_4b
- pop_firws (eeglab plugin)
- cov_shrink.m (should be contained in auxiliaries)
- eqTrials.m (should be contained in auxiliaries)
- getERD.m (should be contained in auxiliaries)
- tilefigs.m (should be contained in auxiliaries)
-
time_frequency_analysis.m
script for conducting time-frequency analysis on data from training block,
required packages/files:- eeglab13_4_4b
- suptitle.m (should be contained in auxiliaries)
- plotWavelet2.m (should be contained in auxiliaries)
- jt_st_wave.m (should be contained in auxiliaries)
- vline.m (should be contained in auxiliaries)
- training_accuracies.m
script for extracting training accuracies of the training block
Scripts need to be run in the given order.
-
extract_EEG_data_according_to_tasks.m
script for extracting EEG data from the feedback block accordings to tasks,
required packages/files:- eeglab13_4_4b
- eeg_load_xdf.m (eeglab plugin)
-
performanceAnalysis_generateANNOUNCE.m
performanceAnalysis_generateCOMMAND.m
performanceAnalysis_generateRM.m
scripts for imposing a trial structure on the data from tasks of the feedback block (order does not matter),
required packages/files:- eeglab13_4_4b
- eeglab13_4_4b
-
performanceAnalysis_successANNOUNCE.m
performanceAnalysis_successCOMMAND.m
performanceAnalysis_successRM.m
scripts for deriving success rates for the trials in tasks from the feedback block (order does not matter),
required packages/files:- eeglab13_4_4b (for all)
- find_command_index_ranges.m (for all but performanceAnalysis_successRM.m, contained in auxiliaries)
- find_command_pattern_in_range.m (for all but performanceAnalysis_successRM.m, contained in auxiliaries)
-
save_all_successes_and_failures_in_one_table.m
script for agglomerating successes and failures from all tasks -
get_trial_frequencies.m
script for calculating the number of trials for commands -
get_chance_level.m
script for evaluating chance levels for the feedback accuracies -
extract_number_of_RMmovements.m
script for extracting RH movements in "rest vs. move task"
-
FCQdata_contr.m
script for calculating assessing the four phenomenological constructs for control subjects -
FCQdata_stroke.m
script for calculating assessing the four phenomenological constructs for stroke patients
Scripts need to be run in the given order.
-
organize_data_for_agregation.m
script for aggregating output files from various scripts -
aggregate_data.m
script for further aggregation -
boxplots.m
script for plotting boxplots
Scripts need to be run in the given order.
-
check_distribution_and_variance.m
script for checking normality and variance homogeneity of the data -
NHST.R
script for conducting null hypothesis significance testing