Announcement

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

  • power, cluster. Combine multiple curves onto one graph

    I am running some power calculations, some of which are to include clustering.

    For example, I one set that is unclustered produces a graph with two curves

    Code:
    power twoproportions (0.344 0.4), n(500(500)4000) power(0.8) ///
        graph(x(N) y(delta)    ///
        ylab(#6) xlab(#10, angle(45)))
    However, when I attempt to cluster, I get less sensical output when I attempt a similar figure using clusters

    Code:
    power twoproportions 0.4 0.344, k1(50) k2(10(10)90) m1(29) m2(29) graph(y(delta))
    Is there a way that I can combine the following figures onto one pane?

    1. Curve one

    Code:
    power twoproportions 0.344, ///
        k1(50) k2(10(10)90) m1(26) m2(26) power(0.8) ///
        graph(y(delta))
    and curve 2?

    Code:
    power twoproportions 0.344, ///
        k1(50) k2(10(10)90) m1(26) m2(26) power(0.8) ///
        graph(y(delta))
    I feel like there must be a simple response that I am simply missing.

    Thank you

  • #2
    You need to add the parentheses around the proportion -p1- so that Stata knows which syntax you mean.

    Code:
    power twoproportions (.4 .344), k1(50) k2(10(10)90) m1(26) m2(26) power(0.8) graph(y(delta)) cluster

    Comment

    Working...
    X