https://github.com/SBIUCD/BDiffProt
Raw File
Tip revision: d08cfc4340c37feac5601cf801a5268ea088203d authored by SBIUCD on 12 May 2016, 10:42:40 UTC
Create README.txt
Tip revision: d08cfc4
Prior.m
function [P2,P3] = Prior(PCTRL,PTRT,alpha)
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here
delta=1-10^-10;
fctrl = sum(PCTRL==0)/(length(PCTRL));
ftrt = sum(PTRT==0)/(length(PTRT));
%P1=0.5+ delta*abs(fctrl-ftrt)./2;
P2= 0.5+ delta*(abs(fctrl-ftrt).^alpha)/2;
P3=0.5.^(1-delta*(abs(fctrl-ftrt).^alpha));


% [P1 P2 P3]
%P1=log(P1);
P2=log(P2);
P3=log(P3);

end

back to top