%plot the mean of the posterior simulations and the 95% bounds %posterior_sim_sens is a length(prior_changes) x MM x 3 page matrix. It %records the MM sampled values from the posterior with c %(=max(lambda_1+lambda_2) varying according to prior_changes pc = length(prior_changes); for j=1:pc sort_post_lam_1(:,j) = sort(posterior_sim_sens(j,:,1)); end x_post_lam_1 = mean(sort_post_lam_1) l_post_lam_1(1:pc) = sort_post_lam_1((MM*.05),1:pc) u_post_lam_1(1:pc) = sort_post_lam_1((MM*.95),1:pc) for j=1:pc sort_post_lam_2(:,j) = sort(posterior_sim_sens(j,:,2)); end x_post_lam_2 = mean(sort_post_lam_1) l_post_lam_2(1:pc) = sort_post_lam_2((MM*.05), 1:pc) u_post_lam_2(1:pc) = sort_post_lam_2((MM*.95), 1:pc) for j=1:pc sort_post_al(:,j) = sort(posterior_sim_sens(j,:,3)); end x_post_al = mean(sort_post_al) l_post_al(1:pc) = sort_post_al((MM*.05), 1:pc) u_post_al(1:pc) = sort_post_al((MM*.95), 1:pc)