jasonwgriffin / metapower

6 stars 0 forks source link

Subgroup Power output different from Mod_Power with same parameters #7

Open mcweenysean opened 3 years ago

mcweenysean commented 3 years ago

Hi - it is my understanding that subgroup and moderator analyses are essentially the same (meta regression with discrete vs continuous variables). However, when I use the same parameters for the 2 respective functions, the output has small differences. The input is: mod_power(n_groups = 2, effect_sizes = c(.4, .5), sample_size = 176, k = 24, es_type = "r") subgroup_power(n_groups = 2, effect_sizes = c(.4, .5), sample_size = 176, k = 24, es_type = "r")

and the respective output:

 Power Analysis for Subgroup analysis: 

 Number of Groups:                  2 
 Groups:                             
 Expected Effect Sizes:             0.4236489 0.5493061 
 Expected Sample Size (per group):  176 
 Expected Number of Studies:        24 

 Esimated Power to detect subgroup differences 

 Fixed-Effects Model:                  0.9799737 
 Random-Effects Model (i2 = 0%):       0.9799737 
 Random-Effects Model (i2 = 25%):      0.9351825 
 Random-Effects Model (i2 = 50%):      0.809968 
 Random-Effects Model (i2 = 75%):      0.5186287 

 Power Analysis for Moderator Analysis: 

 Number of Groups:                  2 
 Groups:                             
 Expected Effect Sizes:             0.4236489 0.5493061 
 Expected Sample Size (per group):  176 
 Expected Number of Studies:        24 

 Esimated Power: Moderator Analysis 

 Fixed-Effects Model:                  0.9816219 
 Random-Effects Model (i2 = 0%):       0.9816219 
 Random-Effects Model (i2 = 25%):      0.9389568 
 Random-Effects Model (i2 = 50%):      0.8166594 
 Random-Effects Model (i2 = 75%):      0.5256477 

Obviously, the differences are small, but should they not be equivalent? Which is accurate?

Another notable difference between the functions is the ability to have k not be a multiple of n_groups (subgroup_power can but mod_power cannot).

jasonwgriffin commented 3 years ago

Hi Sean,

There is a slight difference in how the variance is calculated between these two, which may explain the slight differences in values. I am currently drowning in work, but will look into this soon.

Thanks for feedback, Jason

On Wed, Jun 23, 2021 at 4:34 PM mcweenysean @.***> wrote:

Hi - it is my understanding that subgroup and moderator analyses are essentially the same (meta regression with discrete vs continuous variables). However, when I use the same parameters for the 2 respective functions, the output has small differences. The input is: mod_power(n_groups = 2, effect_sizes = c(.4, .5), sample_size = 176, k = 24, es_type = "r") subgroup_power(n_groups = 2, effect_sizes = c(.4, .5), sample_size = 176, k = 24, es_type = "r")

and the respective output:

Number of Groups: 2 Groups: Expected Effect Sizes: 0.4236489 0.5493061 Expected Sample Size (per group): 176 Expected Number of Studies: 24

Esimated Power to detect subgroup differences

Fixed-Effects Model: 0.9799737 Random-Effects Model (i2 = 0%): 0.9799737 Random-Effects Model (i2 = 25%): 0.9351825 Random-Effects Model (i2 = 50%): 0.809968 Random-Effects Model (i2 = 75%): 0.5186287 ```



Number of Groups:                  2
Groups:
Expected Effect Sizes:             0.4236489 0.5493061
Expected Sample Size (per group):  176
Expected Number of Studies:        24

Esimated Power: Moderator Analysis

Fixed-Effects Model:                  0.9816219
Random-Effects Model (i2 = 0%):       0.9816219
Random-Effects Model (i2 = 25%):      0.9389568
Random-Effects Model (i2 = 50%):      0.8166594
Random-Effects Model (i2 = 75%):      0.5256477 ```

Obviously, the differences are small, but should they not be equivalent? Which is accurate?

Another notable difference between the functions is the ability to have k not be a multiple of n_groups (```subgroup_power``` can but ```mod_power``` cannot).

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/jasonwgriffin/metapower/issues/7>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHFJWYJJDBHD7XTQWCRRJHDTUJAL5ANCNFSM47GRADZQ>
.

--

Jason W. Griffin, M.A

Ph.D. Candidate

Lab of Developmental Neuroscience

The Pennsylvania State University