I am trying to do a power analysis to determine the sample size for Poisson glm regression that I plan to do once I have my experiment data.
The only function that I have been able to find to calculate sample size for Poisson is wp.poisson() in the WebPower package. However, when I run the function (below) I get the resulting error:
wp.poisson(n = NULL,
exp0 = 5.0345,
exp1 = 1.5862,
alpha = 0.05,
power = 0.8,
alternative = "two.sided",
family = "Poisson",
parameter = 1)
Error in uniroot(function(n) eval(p.body) - power, c(2 + 1e-10, 1e+07)) : f.lower = f(lower) is NA
Can someone help me figure this out?
Alternatively, does anyone know how else to do power analysis to determine sample size for a Poisson regression?
Thank you.