Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Implementing two-sided power analysis with twoproportions

    I'm trying to use `power twoproportions` to run a two-sided test plotting the minimum detectable effect given a set of potential sample sizes and an assumed control group take-up rate (p_1)

    Code:
    power twoproportions 0.05, n(2500(500)6000) power(0.8) ///
        graph(x(N) y(delta) ///
        xtitle(Total Number of Units) ///    
        xlab(#10, angle(45)))
    Output:



    The resultant image has the phrase

    Ha : p2 \neq p1: p2 > p1

    Implying that a rejection of the null hypothesis would be defined as having a proportion in the control group that is:

    a) not equal to the treatment group
    b) less than the proportion in the treatment group

    The documentation implies that the code above ought to be running a two-sided test but, as I understand, this ought not condition on part b)

    For example, if I add the `onesided` option, then I'm just testing for p1 < p2 .

    Question: Is the above code actually running just a two sided test whether p1 == p2 and, if so, why is this second statement included in the output? Is there a separate means by which to run just a two-sided test?
    Attached Files
    Last edited by Jack Reimer; 19 Jan 2022, 14:19.
Working...
X