Error in R when performing power analysis: invalid value 0 for 'digits' argument

Viewed 19

I am new to R but I am trying to run a power analysis

library(powerlmm)
> d <- per_treatment(control = dropout_weibull(0.3,2),
+                    treatment = dropout_weibull(0.2,2))
> p <- study_parameters(n1=11,
+                       n2=10,
+                       n3=5,
+                       icc_pre_subject = 0.5,
+                       icc_pre_cluster = 0,
+                       icc_slope = 0.05,
+                       var_ratio = 0.02,
+                       dropout = d,
+                       cohend = -0.8)
> get_power(p)

It gives me this error message. Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid value 0 for 'digits' argument

It does not resolve if I put in a different number for icc_pre_subject. I tried removing it and removing several other elements in the code. Error message keeps coming back.

Does anyone know how to resolve this?

Best, Laura

0 Answers
Related