Errors using powerSim and powerCurve for a clmm in R

343 Views Asked by At

I'm new to clmm and run into the following problem: I want to obtain the optimal sample size for my study with R using powerSim and powerCurve. Because my data is ordinal, I'm using a clmm. Study participants (VPN) should evaluate three sentence types (SH1,SM1, and SP1) on a 5 point likert scale (evaluation.likert). I need to account for my participants as a random factor while the sentence types and the evaluation are my fixed factors. Here's a glimpse of my data (count of VPN goes up to 40 for each of the parameters, I just shortened it here):

     VPN  parameter evaluation.likert
1     1       SH1      2
2     2       SH1      4
3     3       SH1      5
4     4       SH1      3
...
5     1       SM1      4
6     2       SM1      2
7     3       SM1      2
8     4       SM1      5
...
9     1       SP1      1
10    2       SP1      1
11    3       SP1      3
12    4       SP1      5
...

Now, with some help I created the following model: clmm(likert~parameter+(1|VPN), data=dfdata)

With this model, I'm doing the simulation:

ps1 <- powerSim(power, test=fixed("likert:parameter", "anova"), nsim=40)
Warning:
In observedPowerWarning(sim) :
  This appears to be an "observed power" calculation
print(ps1)
Power for predictor 'likert:parameter', (95% confidence interval):
       0.00% ( 0.00,  8.81)

Test: Type-I F-test

Based on 40 simulations, (0 warnings, 40 errors)
alpha = 0.05, nrow = NA

Time elapsed: 0 h 0 m 0 s

nb: result might be an observed power calculation

In the above example, I tried it with 40 participants but I already also ran a simulation with 2000000 participants to check if I just need a huge amount of people. The results were the same though: 0.0%.

lastResult()$errors tells me that I'm using a method which is not applicable for clmm: not applicable method for'simulate' on object of class "clmm"

But besides the anova I'm doing here, I've also already tried z, t, f, chisq, lr, sa, kr, pb. (And instead of test=fixed, I've also already tried test=compare, test=fcompare, test=rcompare, and even test=random())

So I guess there must be something wrong with my model? Or are really none of these methods applicaple for clmms?

Many thanks in advance, your help is already very much appreciated!

0

There are 0 best solutions below