How to generate a negative binomial distribution with different sample sizes for power analyses in R?

Advertisements I try to do a power simulation with an outcome variable that is zero-inflated. So I use a negative binomial distribution. What I need is the following distribution: library(tidyverse) set.seed(123) rt_random <- rnbinom(n = 2000, mu = 25, size = .9) qplot(rt_random) Now, I tried to create a function where I can use different… Read More How to generate a negative binomial distribution with different sample sizes for power analyses in R?