[R] Code modification for post-hoc power

Marc Schwartz
Mon, 26 Aug 2019 12:42:33 -0000

> On Aug 26, 2019, at 6:24 AM, CHATTON Anne via R-help <r-help at
r-project.org> wrote:
>
> Hello everybody,
>
> I am trying to accommodate the R codes provided by Donohue for sample size
calculation in the package "longpower" with lmmpower function to
estimate the post-hoc power (asked by a reviewer) of a binary GEE model with a
three-way interaction (time x condition x continuous predictor) given a fixed
sample size. In other words instead of the sample size I would like to estimate
the power of my study.
>
> Could anyone please help me to modify these codes as to obtain the power
I'm looking for.
>
> I would really appreciate receiving any feedback on this subject.
>
> Yours sincerely,
>
> Anne


Hi,

Three comments:

1. Don't calculate post hoc power. Do a Google search and you will find a
plethora of papers and discussions on why not, including these:

  The Abuse of Power: The Pervasive Fallacy of Power Calculations for Data
Analysis
  The American Statistician, February 2001, Vol. 55, No. 1
  https://www.vims.edu/people/hoenig_jm/pubs/hoenig2.pdf

  Post Hoc Power: Tables and Commentary
  https://stat.uiowa.edu/sites/stat.uiowa.edu/files/techrep/tr378.pdf

  Observed power, and what to do if your editor asks for post-hoc power analyses

http://daniellakens.blogspot.com/2014/12/observed-power-and-what-to-do-if-your.html

  Retraction Watch:
  Statisticians clamor for retraction of paper by Harvard researchers they say
uses a ?nonsense statistic?

https://retractionwatch.com/2019/06/19/statisticians-clamor-for-retraction-of-paper-by-harvard-researchers-they-say-uses-a-nonsense-statistic/

  PubPeer Comments on the paper cited in the above RW post:
  https://pubpeer.com/publications/4399282A80691D9421B497E8316CF6

  A discussion on Frank's Data Methods forum also related to the same paper
cited above:
  "Observed Power" and other "Power" Issues

https://discourse.datamethods.org/t/observed-power-and-other-power-issues/731/30


2. If you are still compelled (voluntarily or involuntarily), you may want to
review the vignette for the longpower package which may have some insights,
and/or contact the package maintainer for additional guidance on how to
structure the code. See the vignette here:

  https://cran.r-project.org/web/packages/longpower/vignettes/longpower.pdf


3. Don't calculate post hoc power.


Regards,

Marc Schwartz