How to get the Monte Carlo simulation of power for Kolmogorov-Smirnov test?

Viewed 32

I am trying to reproduce the simulation results on Razali & Wah's 2011 article "Power comparisons of Shapiro-Wilk, Kolmogorov-Smirov, Lilliefors, and Anderson-Darling tests" which appeared in the Journal of Statistical Modeling and Analytics. My question is that how to get the following picture in R (or Python) only for Kolmogorov-Smirnov test and Lilliefors test.

Our hypotheses test question is that given $X_1,\dots, X_n \sim$ unknown CDF $F$. Let $F_n$ be the empirical CDF. We want to test $$H_0: F=F_0, v.s., F\neq F_0$$ where $F_0$ is the normal distribution $N(0,1)$. Our test statistic as $$ T=\sup_{x\in R} |F_n-F_0(x)|$$

If $T>1-\alpha$ quantile, then we reject $H_0$ at level of significance $\alpha$.

In our Monte Carlo simulation, we take $\alpha=5%$, sample size is 100, $F$ is $Beta(2,2)$.

This paper says that they use "scipy.stats.ksone".

enter image description here

0 Answers
Related