Announcement

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

  • Trouble with powerreg

    Dear list

    I would like to use powerreg for determining the appropriate sample size for a multiple regression model. The module works when only one predictor is in the model, but when specifying multiple predictors, as in:

    powerreg, r2f(0.3) rfr(0.25) nvar(7) ntest(7) power(.80)

    I receive the error message:

    option nn() invalid

    Any information would be greatly appreciated to resolve this problem.

    I am using Stata 12 SE.

    Barth

  • #2
    You could set up a simulation study instead. There's a fairly old article in the Stata Journal (http://www.stata-journal.com/sjpdf.h...iclenum=st0010) that explains how to do so, as well as a more recent example from one of the Stata User Group Conferences http://www.stata.com/meeting/new-orl...3-luedicke.pdf.

    Comment


    • #3
      Your example has a typo. It should be
      Code:
      powerreg, r2f(0.3) r2r(0.25) nvar(7) ntest(7) power(.80)
      However, to get your quoted error message (or something like it), I need a different typo:

      Code:
      . powerreg, r2f(0.3) r2r(0.25) nn(7) ntest(7) power(.80)
      option nn() not allowed
      r(198);

      Comment


      • #4
        Thanks Paul! That did the trick!

        Barth

        Comment

        Working...
        X