Report power if result is statistically significant We have submitted a paper reporting a statistically significant result.
One reviewer asks us to report what is the power to detect a significant association. As there was a previous paper on this issue, we could use the effect size of that paper to do the calculation.
However, we are surprised by this comment, and would be happy to know what is your opinion and whether you know of references that discuss calculation of power at posteriori when the result is significant.

Thank you very much for your responses.
I should have made clearer that we used a large dataset to run these analyses, so the study is unlikely to be underpowered. However, it involves a complex design, and other than running simulations, there is no simple way to compute power. We are not familiar with simulations to compute power, so I was trying to avoid this :-)
 A: Roughly speaking, observing a significant result in a test with low power means that the observed result is unlikely both under the null hypothesis and under the alternative. So interpreting such a result as evidence in favor of the alternative hypothesis can be problematic.
Now you can say that this is just a wrong interpretation (rejecting the null hypothesis does not mean accepting the alternative), but if there is no evidence in favor of some alternative it's not clear how to interpret the result.
As an extreme example, suppose that someone tries to reject some arbitrary null hypothesis (for example, that there is global warming) by flipping a coin 5 times. If they are lucky enough and observe 5 heads in a row, they can claim that the result is significant ($p < 0.05$) and therefore they reject the null hypothesis. But clearly claiming that global warming doesn't exist based on coin flips is completely meaningless.
The issue here is that such a test has no power (more precisely , the power of the test is equal it's size) - the distribution of the test statistic is exactly the same under both hypotheses.
Notice that in a Bayesian analysis those issues don't exist - in the above case, for example, the posterior probabilities will just be euqal to the prior probabilities of both hypotheses because the test carries no relevant information whatsoever. This is one example of the sometimes problematic aspects of frequentist quantities.
A: Context: I wrote this answer before the OP clarified that they are working with a large dataset, so the study (probably) has sufficient power. In my post I consider the more common case of a small study with a "significant finding". Imagine, for example, that the article under review presents an estimate of 1.25 in a domain where previous studies about related phonemena have reported estimates in the range [0.9, 1.1]. How does the article's author respond to the reviewer's request for a post-hoc estimate of power to detect an effect of size 1.25?

It's hard to argue that it doesn't matter if a study with significant p-value is underpowered. If a study has low power and the null hypothesis is rejected, then the sample statistic is likely to be a biased estimate of the population parameter. Yes, you are lucky to get evidence against the null hypothesis but also likely to be over-optimistic. The reviewer knows this so he asks how much power your study had to detect the effect you detected.
It's not recommended to do post-hoc power estimation. This is a much discussed topic on CV; see references below. In short – if your study was indeed underpowered to detect the true effect size – by doing post-hoc power analysis you compound the issue of overestimating the effect by also overestimating the power. Mathematically, the power at the observed effect is a function of the p-value: if the p-value is small, the post-hoc power is large. It's as if the result is more convincing because the same fact — the null is rejected — gets reported twice.
Okay, so enough bad news. How can you respond to the reviewer? Computing the power retroactively is not meaningful because your study is already done. Instead compute confidence interval(s) for the effect(s) of interest and emphasize estimation, not hypothesis testing. If the power of your study is low, the intervals are wide (as low power means that we can't make precise estimates). If the power of your study is high, the intervals are tight, demonstrating convincingly how much you have learned from your data.
If the reviewer insists on a power calculation, don't compute the power by plugging in the estimated effect for the true effect, aka post-hoc power. Instead do sensitivity power analysis: For example, fix the sample size, the power and the significance level, and determine the range of effect sizes that can be detected. Or fix the sample size and the significance, and plot power as a function of effect size. It will be especially informative to know what the power is for a range of realistic effect sizes.
Daniël Lakens discusses power at great length in Improving Your Statistical Inferences. There is even a section on "What to do if Your Editor Asks for Post-hoc Power?" He has great advice.
References
J. M. Hoenig and D. M. Heisey. The abuse of power. The American Statistician, 55(1):19–24, 2001. 
A. Gelman. Don't calculate post-hoc power using observed estimate of effect size. Annals of Surgery, 269(1), 2019. 
Do underpowered studies have increased likelihood of false positives? 
What is the post-hoc power in my experiment? How to calculate this? 
Why is the power of studies that only report significant effects not always 100%? 
Post hoc power analysis for a non significant result? 

This simulation shows that "significant" estimates from underpowered studies are inflated. A study with little power to detect a small effect has more power to detect a large effect. So if the true effect is small and the null hypothesis of no effect is rejected, the estimated effect tends to be larger than the true one.
I simulate 1000 studies with 50%, so about half of the studies have p-value < 0.05. The sample means from those "significant" studies are mostly to the right of the true mean 0.1, ie. they overestimate the true mean, often by a lot.

library("pwr")
library("tidyverse")

# Choose settings for an underpowered study

mu0 <- 0
mu <- 0.1

sigma <- 1
alpha <- 0.05
power <- 0.5

pwr.t.test(d = (mu - mu0) / sigma, power = power, sig.level = alpha, type = "one.sample")
#> 
#>      One-sample t test power calculation 
#> 
#>               n = 386.0261
#>               d = 0.1
#>       sig.level = 0.05
#>           power = 0.5
#>     alternative = two.sided

# Sample size to achieve 50% power to detect mean 0.1 with a one-sided t-test
n <- 387

# Simulate 1,000 studies with low power

set.seed(123)
reps <- 1000

studies <-
  tibble(
    study = rep(seq(reps), each = n),
    x = rnorm(reps * n, mean = mu, sd = sigma)
  )

results <- studies %>%
  group_by(
    study
  ) %>%
  group_modify(
    ~ broom::tidy(t.test(.))
  )

results %>%
  # We are only interested in studies where the null is rejected
  filter(
    p.value < alpha
  ) %>%
  ggplot(
    aes(estimate)
  ) +
  geom_histogram(
    bins = 33
  ) +
  geom_vline(
    xintercept = mu,
    color = "red"
  ) +
  labs(
    x = glue::glue("estimate of true effect {mu} in studies with {100*power}% power"),
    y = "",
    title = "\"Significant\" effect estimates from underpowered studies are inflated"
  )

Created on 2022-04-30 by the reprex package (v2.0.1)
A: The power of the observed effect is very often equal to a simple relationship with the p-value (and the significance level) since both the p-value and the power are dependent on how many standard deviations the effect size is away from zero effect.
Let's consider this simplistic model in which you have an observation whose likelihood function can be approximated with a normal distribution. Say that the significance level is 5% (or roughly 2 deviations away from zero effect) and we observe an effect with a p-value of 1.24% (or roughly 2.5 deviations away from zero effect) then the power for that observed effect is equal to roughly 69.1% (the probability that the observed effect is more than 2 deviations away from the zero effect given that the true effect is 3 deviations away).
You have a more complex model but often the estimates are approximately equal to a normal distributed variable.

A: The existing answers provide useful information and arguments, but I disagree with them on what I see as the core question: is it useful to do a post hoc power analysis? I would argue that it IS useful - if you are set on using a Null Hypothesis Statistical Testing framework.
It is absolutely crucial that this analysis is not done with the effect size estimated from the study itself. Instead, I would use either (a) the best estimate based on previous studies that have examined this question, or if this isn't possible, (b) the smallest effect size that would be interesting.
What would such an analysis achieve? It would indicate whether the study was appropriately powered to detect a meaningful effect size. If your study was unlikely to detect the expected effect size, it doesn't mean your finding was wrong - but it is reasonable to be sceptical of the robustness of the analysis and inferences.
Why is it important to not use the effect size estimated in the same study? Because as @dipetkov's answer shows, significant effect sizes are  inflated in underpowered studies (and are quite likely to be in the opposite direction of the true effect!). Plugging an inflated estimate into a power calculation would be circular and overestimate the study's power.
That said, I agree with the answers pointing you towards thinking of this in a Bayesian framework. This avoids some of the messiness arising as a result of NHST, which can sometimes struggle for coherence as a result of the "p < 0.05 = truth" fallacy with which it is so tightly enmeshed.
In support of these claims, I'll point you to the same Andrew Gelman letter that @dipetkov's answer does, and also to his blog post about it that makes the same point less formally:
https://statmodeling.stat.columbia.edu/2018/09/24/dont-calculate-post-hoc-power-using-observed-estimate-effect-size/
Gelman, A. (2019). Don’t calculate post-hoc power using observed estimate of effect size. Annals of Surgery, 269(1), e9-e10.
