Statistical Significance

Add statistical significance lines and asterisks to an existing plot
420 download
Aggiornato 21 mag 2021

Visualizza la licenza

This script gets an axis handle and a 4D matrix (stats) and plots significance lines and asterisks on top.
Significance lines and asterisks are added only for pairs assigned with a positive value (the number of asterisks) in stats. For non-integer values, the p-value is displayed instead.
To set the stats matrix, simply initialize a 4D matrix with the first two dimensions corresponding to categories, and the last two dimensions to groups (see the examples file).
Then, assign the number of asterisks (or p-value) to the relevant pairs. For example:
stats = zeros(5,5,4,4); % Initialize the stats matrix for 5 categories and 4 groups.
stats(1,3,1,2) = 2; % Add a significance line and two asterisks between the bar of category 1, group 1, and the bar of category 3, group 2.
This script takes into account error bars when adding significance lines, and can also deal with bar plots generated using the 'hist' parameter (see example 2).

Cita come

Omer Yuval (2024). Statistical Significance (https://www.mathworks.com/matlabcentral/fileexchange/92613-statistical-significance), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2020b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0