The power is computed using simulations. n datasets is
simulated from the
Same Different model with specified parameters. The power is the
fraction of times the p-value is lower than alpha.
Under some parameter combinations, there is a non-significant
probability that data will fall, so that the MLE of delta is
not defined and the p-value is not defined. All such undefined
p-values are silently ignored.
The estimated power may change between runs and especially if the
power is either very large or very small (ie. close to 0 or 1). Using
more simulations will provide higher accuracy.
It is often a good idea to run the power simulation a couple of times
to ensure that the variation in the result is acceptable.