Hi, i need to calculate the p-value given the kolmogorv smirnov test statistic (two sided). When I look at the function ks.test I found the following function which calls C code:
pkstwo <- function(x, tol = 1e-06) { if (is.numeric(x)) x <- as.vector(x) else stop("Argument x must be numeric") p <- rep(0, length(x)) p[is.na(x)] <- NA IND <- which(!is.na(x) & (x > 0)) if (length(IND) > 0) { p[IND] <- .C("pkstwo", as.integer(length(x)), p = as.double(x[IND]), as.double(tol), PACKAGE = "ctest")$p } return(p) } Extracting and using this function, I get the following error message: Error in .C("pkstwo", as.integer(length(x)), p = as.double(x[IND]), as.double(tol), : C entry point "pkstwo" not in DLL for package "ctest" Any suggestions (perhaps a small example) how to calculate the p-value for the KS-statistic (without using ks.test()!!!). Help is welcome. Regards Jaci -- ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.