I have a question about calculating the power of Kolmogorov-Smirnov test, given the following: H0: mu=0, H1:m!=0, alpha = 0.05, for N(mu, 1), while true mu=0.1, for sample sizes n1 = 30, n2 = 1000. I have been struggling to find a way to calculate the power of KS test. I have covered this thread, but it was covering the exponential distribution, and I am not really getting how to apply that to normal distribution.
Any suggestions? I would be also glad to receive recommendations if there are any resources/literature that would help with this.
mean(replicate(nsim, ks.test(rexp(n1,1),rexp(n2,s[i]))$p.value)<alpha)
-- which is the line you need for a single alternative. That's just simple coding, not statistics ... and it sounds like we could end up just doing your homework or something. It would seem irresponsible to just post an answer. $\endgroup$