Hi. Since the modification of the power.prop.test() function in R 3.1.3 ("power.t.test() and power.prop.test() now make use of the extendInt option of uniroot() and hence work in more extreme cases. (PR#15792)") the function can display proportion over 1 without warning message. Example: power.prop.test(n=30, p1=0.90, p2=NULL, sig.level=0.05, power=0.8, alternative="two.sided", strict=TRUE) Two-sample comparison of proportions power calculation n = 30 p1 = 0.9 p2 = 1.030182 sig.level = 0.05 power = 0.8 alternative = two.sided NOTE: n is number in *each* group This was not the case before the modification. Moreover, in ?power.prop.test(), the following sentence is not clear: "If one of them is computed p1 < p2 will hold, although this is not enforced when both are specified". Many thanks for your help.

(In reply to gael.millot from comment #0) > Hi. > > Since the modification of the power.prop.test() function in R 3.1.3 > ("power.t.test() and power.prop.test() now make use of the extendInt option > of uniroot() and hence work in more extreme cases. (PR#15792)") > the function can display proportion over 1 without warning message. > Example: > > power.prop.test(n=30, p1=0.90, p2=NULL, sig.level=0.05, power=0.8, > alternative="two.sided", strict=TRUE) > > Two-sample comparison of proportions power calculation > > n = 30 > p1 = 0.9 > p2 = 1.030182 > sig.level = 0.05 > power = 0.8 > alternative = two.sided > > NOTE: n is number in *each* group > > This was not the case before the modification. where it gave an error. There's no valid p2 > p1 ensuring such power. You can see a boundary here: > power.prop.test(p1 = 0.90, p2 = 1.0, power=0.8) Two-sample comparison of proportions power calculation n = 73.37427 p1 = 0.9 p2 = 1 sig.level = 0.05 power = 0.8 alternative = two.sided So, indeed, only when n >= 74 do you get a valid p2 <= 1. Should we return an error in these cases instead? Or just a warning? I agree that one or the other should happen, but I don't really know. I think I have never used the function (nor any power calculations in "real life" I think), so maybe others should voice an opinion. > > > Moreover, in ?power.prop.test(), the following sentence is not clear: > > "If one of them is computed p1 < p2 will hold, although this is not enforced > when both are specified". Well, I did not write it, but I do understand it. Is the following a bit clearer? If one of p1 and p2 is computed, then p1 < p2 is assumed and will hold (but you can specify p2 <= p1). > > Many thanks for your help.

I've decided to only signal a warning for now (and only in R-devel)... Current plan is to port to R-patched ... and possibly --- typically after a year so, make the warning into an error.

Yes, the sentence is clearer to me. Thanks for everything !