simr: powerSim gives 100% for all effect sizes

Viewed 22

I have carried out a binomial GLMM to determine how latitude and native status (native/non-native) of a set of plant species affects herbivory damage. I am now trying to determine the statistical power of my model when I change the effect sizes. My model looks like this:

latglmm <- glmer(cbind(chewing,total.cells-chewing) ~ scale(latitude) * native.status + scale(sample.day.of.year) + (1|genus) + (1|species) + (1|catalogue.number), family=binomial, data=mna)

where cbind(chewing,total.cells-chewing) gives me a proportion (of leaves with herbivory damage), native.status is either "native" or "non-native" and catalogue.number acts as an observation-level random effect to deal with overdispersion. There are 10 genus, each with at least 1 native and 1 non-native species to make 26 species in total. The model summary is:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: cbind(chewing, total.cells - chewing) ~ scale(latitude) * native.status +  
    scale(sample.day.of.year) + (1 | genus) + (1 | species) + (1 | catalogue.number)
   Data: mna

     AIC      BIC   logLik deviance df.resid 
  3986.7   4023.3  -1985.4   3970.7      706 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.3240 -0.4511 -0.0250  0.1992  1.0765 

Random effects:
 Groups           Name        Variance Std.Dev.
 catalogue.number (Intercept) 1.26417  1.1244  
 species          (Intercept) 0.08207  0.2865  
 genus.ID         (Intercept) 0.33431  0.5782  
Number of obs: 714, groups:  catalogue.number, 713; species, 26; genus.ID, 10

Fixed effects:
                                 Estimate Std. Error z value Pr(>|z|)    
(Intercept)                      -2.61310    0.20849 -12.534  < 2e-16 ***
scale(latitude)                         -0.17283    0.06370  -2.713  0.00666 ** 
native.statusnon-native           0.11434    0.15554   0.735  0.46226    
scale(sample.day.of.year)                         0.28521    0.05224   5.460 4.77e-08 ***
scale(latitude):native.statusnon-native -0.02986    0.09916  -0.301  0.76327    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) scallt ntv.s- scaldy
scalelat     0.012                     
ntv.sttsnn- -0.304 -0.014              
scaledoy     0.018 -0.085 -0.027       
scllt:ntv.- -0.011 -0.634  0.006 -0.035

I should add that the actual model I have been using is a glmmTMB model as lme4 still had some overdispersion even with the observation-level random effect, but this is not compatible with simr so I am using lme4 (the results are very similar for both). I want to see what happens to the model power when I increase or decrease the effect sizes of latitude and native status but when I run fixef(latglmm1)["scale(latitude)"]<--1 and fixef(latglmm1)["native.statusnon-native"]<--1 and try this:

powerSim(latglmm, fcompare(~ scale(latitude) + native.status))

I get the following output:

Power for model comparison, (95% confidence interval):====================================================================|
      100.0% (69.15, 100.0)

Test: Likelihood ratio
      Comparison to ~scale(latitude) + native.status + [re]

Based on 10 simulations, (0 warnings, 0 errors)
alpha = 0.05, nrow = 1428

Time elapsed: 0 h 1 m 5 s

The output is the same (100% power) no matter what I change fixef() to. Based on other similar questions online I have ensured that my data has no NA values and according to my powerSim there are no warnings or errors to address. I am completely lost as to why this isn't working so any help would be greatly appreciated!

Alternatively, if anyone has any recommendations for other methods to carry out similar analysis I would love to hear them. What I really want is to get a p-value for each effect size I input but statistical power would be very valuable too.

Thank you!

0 Answers
Related