I am interested in recreating the SAS NPAR1WAY results when creating an Empirical Distribution of Rank Test.
I found the following code for how to create the empirical distribution of rank graph using the iris dataset from Easier way to plot the cumulative frequency distribution in ggplot?
library(plyr)
data(iris)
#Ecdf within species
iris.species <- ddply(iris, .(Species), summarize,
Sepal.Length = unique(Sepal.Length),
ecdf = ecdf(Sepal.Length)(unique(Sepal.Length)))
ggplot(iris.species, aes(Sepal.Length, ecdf, color = Species)) + geom_step()
But I'm not sure how I would code the Kolmogorov-Smirnov Test, Cramer-von Mises Test, or Kuiper Test for Sepal.Length classified by Species.
Any help would be greatly appreciated!