It notes here that N-P approach does not utilize the information in the accurate p value. Actually, at the time N-P approach was firstly devised, the accurate p value was not available usually. Now almost all statistic softwares provide accurate p values and the N-P approach becomes obsolete. Wilkinson & APA TFSI (1999) recommended to report the accurate p value rather than just significance/insignificance, unless p is smaller than any meaningful precision.
p_prior<-0.22;
##try p_prior<-0.82 to demo significant repetition once more
p_alpha<-0.05;
p_power<-0.8;
##-----------------
op <- par(mfrow=c(1,2));
h_1_s<-p_power*p_prior/(p_alpha*(1-p_prior)+p_power*p_prior);
h_0_i<-(1-p_alpha)*(1-p_prior)/((1-p_alpha)*(1-p_prior)+(1-p_power)*p_prior);
##
D<-matrix(c(1-p_alpha,p_alpha,1-p_power,p_power),nrow=2);
rownames(D)<-c("Insig","Sig");
colnames(D)<-c(paste(1-p_prior,"H_0"),paste(p_prior,"H_1"));
barplot(D
,width=c(1-p_prior,p_prior)
,legend = rownames(D)
,space=0
,col=c(gray(0.6),gray(0.9)),asp=1
);
title(main=paste("Sig: H_1 from",p_prior,"to"
,round(h_1_s,digits=2)
,"\n","Insig: H_0 from",1-p_prior,"to"
,round(h_0_i,digits=2)
)
,sub=paste(round(h_1_s,digits=2),"=(",p_power,"*",p_prior,")/("
,p_alpha,"*",1-p_prior,"+",p_power,"*",p_prior,")"
,"\n",round(h_0_i,digits=2)
,"=(",1-p_alpha,"*",1-p_prior,")/("
,1-p_alpha,"*",1-p_prior,"+",1-p_power,"*",p_prior,")"
)
);
##
v_power<-c(0.1,(5:9)/10);
v_prior<-(1:1000)/1000;
n<-length(v_power);
v_c<-sample(colors())[1:n];
plot(v_prior,v_prior,type="l",col="black"
,xlab="a_prior",ylab="post_hoc",asp=1
,xlim=c(0,1),ylim=c(0,1),main="Power=.1,.5,.6,.7,.8, and .9");
lines(v_prior,1-v_prior);
for (i in 1:n){
p_power<-v_power[i];
v_1_s<-p_power*v_prior/(p_alpha*(1-v_prior)+p_power*v_prior);
v_0_i<-(1-p_alpha)*(1-v_prior)/((1-p_alpha)*(1-v_prior)+(1-p_power)*v_prior);
lines(v_prior,v_1_s,col=v_c[i])
lines(v_prior,v_0_i,col=v_c[i])
}
points(p_prior,h_1_s,col="red");
points(p_prior,p_prior,col="red");
points(p_prior,h_0_i,col="blue");
points(p_prior,1-p_prior,col="blue");
par(op);
Wilkinson, L. & APA TFSI (1999). Statistical methods in psychology journals: Guidelines and explanations. American Psychologist, 54, 594-604.