View source: R/find_max_amp_diff.R
This function takes a data set imported by the import.epochs.ep() function and evaluates the differences regarding the area under the curve (AUC) for two conditions for each electrode, and performs the difference. The higher the differences of AUC, the more different the conditions. For now, the function takes only datasets with two conditions. If your dataset has a higher number of conditions, please consider applying this function 2 conditions by 2 conditions. Be careful, a minimal difference of AUC does not necessarily mean that there is no difference between two conditions. If the temporal window is large enough, two curves intersecting in an X shape might result to a minimal differences. Differences in time lag between two condition will also have a small AUC difference. This function helps you to chose the right electrodes but do not use it blindly !
1 | find_max_amp_diff(data, condition_var, time_var, N_electrodes)
|
data |
A dataset imported with the import.epochs.ep() function |
condition_var |
variable of data containing the different conditions for each subject. Use the tidy format (simply the column name without $ or data[]) |
time_var |
Variable containing the time information, either in time frames or in ms. Use the tidy format (simply the column name without $ or data[]) |
N_electrodes |
Number of electrodes used in the file. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.