I am using power repeated for a sample size calculation. It is successful in calculating the 'between effect' and 'between–within effect' sample size, but fails with the 'within effect'
I would be grateful for any suggestions on how to resolve this problem.
Thank you,
Martyn
Stata 15.1 (IC) Current update level:27 Jun 2018
Code:
. matrix M = (0.415,0.496,0.549,0.588,0.887,0.881\ ///
> 0.91,0.983,1.011,1.645,2.421,2.917\ ///
> 0.938,0.814,0.735,0.641,0.599,0.71\ ///
> 0.754,0.848,0.842,1.112,1.796,2.635)
. matrix C = (0.513,0.308,0.308,0.308,0.308,0.308\ ///
> 0.308,0.513,0.308,0.308,0.308,0.308\ ///
> 0.308,0.308,0.513,0.308,0.308,0.308\ ///
> 0.308,0.308,0.308,0.513,0.308,0.308\ ///
> 0.308,0.308,0.308,0.308,0.513,0.308\ ///
> 0.308,0.308,0.308,0.308,0.308,0.513)
. power repeated M, covmatrix(C)
Performing iteration ...
Estimated sample size for repeated-measures ANOVA
F test for between subjects
Ho: delta = 0 versus Ha: delta != 0
Study parameters:
alpha = 0.0500
power = 0.8000
delta = 0.7143
N_g = 4
N_rep = 6
means = <matrix>
Var_b = 0.1746
Var_be = 0.3422
Cov = <matrix>
Estimated sample sizes:
N = 28
N per group = 7
. power repeated M, covmatrix(C) factor(bwithin)
Performing iteration ...
Estimated sample size for repeated-measures ANOVA
F test for between-within subjects with Greenhouse-Geisser correction
Ho: delta = 0 versus Ha: delta != 0
Study parameters:
alpha = 0.0500
power = 0.8000
delta = 1.9218
N_g = 4
N_rep = 6
means = <matrix>
Var_bw = 0.1262
Var_bwe = 0.0342
Cov = <matrix>
spherical = true
Estimated sample sizes:
N = 12
N per group = 3
. power repeated M, covmatrix(C) factor(within)
Performing iteration ...
failure to compute sample size;
The computed initial value for the search algorithm failed. It is likely that the estimate is not achievable given the input parameters and the domain limits of the power function.
r(498);
Code:
Thank you,
Martyn
Stata 15.1 (IC) Current update level:27 Jun 2018
