vassarp.m 270 B

123456789101112
  1. function corr_pval=vassarp(vector_r,num_cells)
  2. %corr_pval=vassarp(vector_r,num_cells)
  3. % 2017 A.Leo
  4. tdist=nan(length(vector_r),1);
  5. corr_pval=nan(length(vector_r),1);
  6. tdist=vector_r./(sqrt(((1-(vector_r.^2))./(num_cells-2))));
  7. corr_pval=1-tcdf(tdist,num_cells-1);
  8. end