dependents_plot

Visualises dependents of one variable on another.
1,1K téléchargements
Mise à jour 24 nov. 2014

Afficher la licence

Visualises dependents of one variable on another.
Plots conditional statistics. The statistics plotted by default is the conditional mean. However, any other statistics also can be plotted.

For example, let's assume that you have two metrics:
- duration of atrial fibrillation during 24 hour ambulatory ECG recording (stored in vector 'holter').
- peak ischemic ST depression during cardiac stress test (stored in vector 'ST').
and you need to analyse the conditional probability distribution of the former on the later.
Use the following commands to initialize the variables:
>> N = 1e5;
>> ST = 2*pi*(1:N)/N;
>> holter = sin(ST) + randn(size(ST));

Show E(holter|ST):
>> dependents_plot(ST,holter)
Show E(holter|ST), conditional standard deviation, and maximum:
>> dependents_plot(ST,holter,[],{@mean, @std, @max})

Basically, you can show any statistics you need; all you need is to provide an appropriate function handle. For example, you can show different percentiles:
>> index_ = @(v,ii) v(ii);
>> perc = @(v,p) index_(sort(v(:)), max(round(numel(v)*p/100),1)); % find percentile (p= 0..100)
>> dependents_plot(ST,holter,[],{@(z) perc(z,10), @(z) perc(z,30), @median, @mean, @(z) perc(z,70), @(z) perc(z,90)});
>> legend('10%','30%','median','mean','70%','90%')

This submission is courtesy of Norav Medical (www.norav.com) - the leading company in the fields of PC-ECG, EKG Management systems and related non-invasive cardiac devices.

Citation pour cette source

Mark Matusevich (2026). dependents_plot (https://fr.mathworks.com/matlabcentral/fileexchange/45481-dependents_plot), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2009b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Frequently-used Algorithms dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.1

Bug fix : elements where X was equal to max(X) were counted in the lowest bin instead of the highest bin.

Also, change behavior of map2bins when mode=='center' or vBins is a number: the first and the last bins are now extended to infinity.

1.0.0.0