## Buffon's needle [Power / Sample Size]

Dear all!

I was interested how it works on real data. For this purpose I've calculated the power for ~50 real 2x2 successful studies. Of course sample size is too low to make any conclusions but the tendency is pretty similar. The results are below. Please correct me if my reasoning is wrong.

The GMR of Cmax follows the lognormal distribution (p=0.123, Shapiro-Wilk W test), Geometric Mean PE was 0.9824, and including plus-minus SD for log-tranformed data leads to 0.935-1.032. So assuming 94-95% in sample size calculation seems to be good at reflecting the expected ratio.

Mean CV was 20.5% (median 18.5%). The average a posteriori power was 86.21% (median 97.33%). The distribution was as follows:

I've reproduced the calculation performed by Helmut for CV=18.5%, GMR=98.24% and 10% and 20%-drop-out rates.

For 10% I got

For 20%:

Blue histogram is for real data (nbins=15). The higher rate for power close to 1 in real data should be connected with the redundant number of subjects in studies with low CV (for CV lower than 22% and GMR=0.95 the power would be greater than 80% when the involved number of subjects is more than 24).

P.S.

One needs "s" on the end of "package(s)"?

extra ")"?

Anticipating the question "but why"? First, the R, Detlew's and Helmut's code possibilities are really impressive! And second: to make sure again that a posteriori power is needless thing and it is waste of paper to include it in the report.

-Why are you teaching your sister bad words?

-I want her to know them and never repeat.

I was interested how it works on real data. For this purpose I've calculated the power for ~50 real 2x2 successful studies. Of course sample size is too low to make any conclusions but the tendency is pretty similar. The results are below. Please correct me if my reasoning is wrong.

The GMR of Cmax follows the lognormal distribution (p=0.123, Shapiro-Wilk W test), Geometric Mean PE was 0.9824, and including plus-minus SD for log-tranformed data leads to 0.935-1.032. So assuming 94-95% in sample size calculation seems to be good at reflecting the expected ratio.

Mean CV was 20.5% (median 18.5%). The average a posteriori power was 86.21% (median 97.33%). The distribution was as follows:

```
≥ target : 73.58%
```

≥ achieved : 67.92%

≥ 0.90 : 62.26%

[0.95, 0.99]: 16.98%

≥ 0.95 : 56.60%

That is in 26.42% successful studies post hoc power was less than 80%. Why not in 50%? I suppose it is connected with two facts: the real number of subjects is always greater than calculated because researches include drop-outs and there exists the restricted limit of minimum of subjects in the study. I've reproduced the calculation performed by Helmut for CV=18.5%, GMR=98.24% and 10% and 20%-drop-out rates.

For 10% I got

```
≥ target : 66.21%
```

≥ achieved : 61.56%

≥ 0.90 : 40.83%

[0.95, 0.99]: 16.90%

≥ 0.95 : 24.02%

For 20%:

```
≥ target : 79.65%
```

≥ achieved : 75.51%

≥ 0.90 : 54.21%

[0.95, 0.99]: 23.58%

≥ 0.95 : 34.09%

Blue histogram is for real data (nbins=15). The higher rate for power close to 1 in real data should be connected with the redundant number of subjects in studies with low CV (for CV lower than 22% and GMR=0.95 the power would be greater than 80% when the involved number of subjects is more than 24).

P.S.

```
if (length(packages[!inst]) > 0) install.packages(packages[!inst])
```

One needs "s" on the end of "package(s)"?

`cat("Results of", nsims, "simulated studies:\n")); summary(res)`

extra ")"?

Anticipating the question "but why"? First, the R, Detlew's and Helmut's code possibilities are really impressive! And second: to make sure again that a posteriori power is needless thing and it is waste of paper to include it in the report.

-Why are you teaching your sister bad words?

-I want her to know them and never repeat.

### Complete thread:

- Power is getting high kms.srinivas 2017-12-26 07:39
- Power is getting high? d_labes 2017-12-26 12:08
- Stop estimating post hoc power! Helmut 2017-12-26 12:22
- Stop estimating post hoc power! kms.srinivas 2017-12-26 13:00
- Stop estimating post hoc power! ElMaestro 2017-12-26 14:11
- Simulations Helmut 2017-12-26 15:51
- Simulations BE-proff 2017-12-27 06:53
- Simulations ElMaestro 2017-12-27 07:25
- Simulations Yura 2017-12-27 08:23
- Simulations kms.srinivas 2017-12-27 09:11
- Simulations Yura 2017-12-27 10:07
- α and 1–β Helmut 2017-12-27 12:57
- α and 1–β Yura 2017-12-27 13:33
- α and 1–β Helmut 2017-12-27 14:31
- α and 1–β Yura 2017-12-28 06:50
- Educate the IEC and regulators Helmut 2017-12-28 11:30

- α and 1–β Yura 2017-12-28 06:50

- α and 1–β Helmut 2017-12-27 14:31

- α and 1–β Yura 2017-12-27 13:33

- α and 1–β Helmut 2017-12-27 12:57
- “Forced BE” 101 Helmut 2017-12-27 12:23
- “Forced BE” 101 kms.srinivas 2017-12-27 12:41
- Would you be so kind answering our questions? Helmut 2017-12-27 13:02
- Would you be so kind answering our questions? kms.srinivas 2017-12-28 05:53
- Yes, but why? Helmut 2017-12-28 11:47
- Yes, but why? DavidManteigas 2017-12-28 16:59
- Optimists and pessimists Helmut 2017-12-28 17:33
- "normal" GMR setting d_labes 2017-12-28 18:57
- Example for discussion mittyri 2017-12-28 22:06
- Example for discussion Helmut 2017-12-28 22:33

- I prefer to play it safe Helmut 2017-12-28 22:10

- Example for discussion mittyri 2017-12-28 22:06

- "normal" GMR setting d_labes 2017-12-28 18:57
- Full ACK d_labes 2017-12-28 17:41
- About GMR 1.10 kms.srinivas 2017-12-29 13:20
- Better 0.95 or 0.90 Helmut 2017-12-29 16:18

- Optimists and pessimists Helmut 2017-12-28 17:33
- Yes, but why? Yura 2017-12-29 13:46
- Buffon's needleAstea 2018-01-20 23:55
- Buffon's needle Oleg777 2018-10-09 22:48
- 0.95 or 1.05 Helmut 2018-10-10 13:41

- Buffon's needle Helmut 2018-10-10 12:46
- Buffon's needle Astea 2018-10-11 23:14
- School maths Helmut 2018-10-12 01:10
- School russian Astea 2018-10-12 12:41
- Offtop: Umschrift der westlichen Eigennamen auf Russisch mittyri 2018-10-12 23:25

- School maths Helmut 2018-10-12 01:10

- Buffon's needle Astea 2018-10-11 23:14

- Buffon's needle Oleg777 2018-10-09 22:48

- Yes, but why? DavidManteigas 2017-12-28 16:59

- Yes, but why? Helmut 2017-12-28 11:47
- EEU? mittyri 2017-12-28 21:52
- EEU? Yura 2017-12-29 13:41
- EEU - pharmacokinetic equation??? mittyri 2017-12-29 14:11

- EEU? Beholder 2018-01-16 15:10

- EEU? Yura 2017-12-29 13:41

- Would you be so kind answering our questions? kms.srinivas 2017-12-28 05:53

- Would you be so kind answering our questions? Helmut 2017-12-27 13:02

- “Forced BE” 101 kms.srinivas 2017-12-27 12:41

- Simulations Yura 2017-12-27 10:07

- Simulations kms.srinivas 2017-12-27 09:11
- Simulations xtianbadillo 2018-01-18 22:22

- Simulations BE-proff 2017-12-27 06:53

- Stop estimating post hoc power! kms.srinivas 2017-12-26 13:00
- Numbers don't lie ElMaestro 2017-12-28 20:13