Skip to content

Commit

Permalink
Added a script to generate plots for example4.m without the statistics
Browse files Browse the repository at this point in the history
toolbox.
  • Loading branch information
pcarbo committed Aug 26, 2016
1 parent 9cb3285 commit 13e8a34
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/example3_plots.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
% Note: Only works in MATLAB 2014a or later since "histogram" function
% was introduced in that version of MATLAB.
se1=matfile('example3_se1.mat');
se2=matfile('example3_se2.mat');
% Run this script after example3.m. Note: This script only works in MATLAB
% 2014a or later since "histogram" function was introduced in that version
% of MATLAB.
se1 = matfile('example3_se1.mat');
se2 = matfile('example3_se2.mat');

figure(1);
subplot(2,2,1);
Expand Down
29 changes: 29 additions & 0 deletions examples/example4_plots.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
% Run this script after running example4.m.
load('example4-theta04-theta2-100trials.mat');

figure(1);
clf;
subplot(2,2,1);
bplot([alpha_n_diff mu_n_diff s_n_diff]);
set(gca,'YLim',[0 0.002]);
set(gca,'XTick',1:3,'XTickLabel',{'\alpha','\mu','s'},'FontSize',14);
ylabel('maximum absolute difference');
title('Null models');

subplot(2,2,2);
bplot([alpha_e_diff mu_e_diff s_e_diff])
set(gca,'YLim',[0 0.002]);
set(gca,'XTick',1:3,'XTickLabel',{'\alpha','\mu','s'},'FontSize',14);
ylabel('maximum absolute difference');
title('Enrichment models');

subplot(2,2,3);
scatter(log10(bf(:, 1)), log10(bf(:, 2)),'b','*');
hold on
plot([-5 30],[-5 30],'-','Color','red');
hold off
% ozline = refline([1 0]);
% ozline.Color = 'r';
xlabel('Log10 Bayes factors from VARBVS','Interpreter','none');
ylabel('Log10 Bayes factors from RSS-VARBVSR','Interpreter','none');
title('');

0 comments on commit 13e8a34

Please sign in to comment.