function prt_p_summary(p_summary,country_code,fileID,pct);
 
 n_c = size(country_code,1);
 fprintf(fileID,'Posterior Means \n');
 fprintf(fileID,',');
 for i = 1:n_c;
     str = char(country_code(i));
     fprintf(fileID,[str ',']);
 end;
 fprintf(fileID,'\n');
 for i = 1:n_c;
     str = char(country_code(i));
     fprintf(fileID,[str ',']);
     tmp = squeeze(p_summary(i,:,1));
     prtmat_comma(tmp,fileID,'%5.2f','\n');
 end;
 fprintf(fileID,' \n');
 tmp = squeeze(p_summary(:,:,1));
 mask = tril(true(size(tmp)),-1);
 tmpp = tmp(mask);
 avg_cor = mean(tmpp);
 max_cor = max(tmpp);
 min_cor = min(tmpp);
 num_zero = sum(abs(tmpp) < .01);
 frac_zero = mean(abs(tmpp) < .01);
 fprintf(fileID,'Average Value:,%5.2f \n',avg_cor);
 fprintf(fileID,'Maximum Value:,%5.2f \n',max_cor);
 fprintf(fileID,'Minimum Value:,%5.2f \n',min_cor);
 fprintf(fileID,'Number and fraction < 0.01 :,%5i, %5.2f \n',[num_zero frac_zero]);
 fprintf(fileID,' \n\n');
 
 for ip = 1:size(pct,1);
     fprintf(fileID,'Percentile: %5.3f \n',pct(ip));
     fprintf(fileID,',');
     for i = 1:n_c;
        str = char(country_code(i));
        fprintf(fileID,[str ',']);
     end;
     fprintf(fileID,'\n');
     for i = 1:n_c;
        str = char(country_code(i));
        fprintf(fileID,[str ',']);
        tmp = squeeze(p_summary(i,:,1+ip));
        prtmat_comma(tmp,fileID,'%5.2f','\n');
     end;
     fprintf(fileID,' \n\n');
 end;
end

