I understand how the simulation at Power calculation for likelihood ratio test can compute the alpha, using prop.test, and the power from a direct count of simulation values, for two Poisson distributed variables. I am interested in doing power analysis to determine the necessary number of samples, similar to using pwr.t.test(d = d, sig.level = 0.05, power = 0.8), except doing this between two samples from (suspected) Poisson distributions, and so thus not using t-tests.
With given distributions I could calculate alpha and the Power here, how would I determine a suitable n? I suppose one way is to write a loop that calculates power for increasing n until the power falls within the desired threshold, but that seems computationally intense.
What is the best way to approach this problem?
Thanks in advance, Matt.