ks_dist | R Documentation |
A function to calculate the Kolmogorov-Smirnov distance. It is used in estimate_parameters_ks to estimate the parameter that minimize the distance in the optim function from the stats library.
ks_dist(theta, ecdf)
theta |
A vector. with two elements. The two Kimura parameters h0 and b. |
ecdf |
A vector containing 10000 values from the empirical cumulative distribution function of the input heteroplasmy data vector. To be used in the optim function in estimate_parameters_ks. |
The maximum distance from the theoretical Kimura distribution.
h=rnorm(20,0.5,0.1)
ecdf_h <- (stats::ecdf(h))(seq(0, 1, 1e-04))
ks_dist(c(0.5,0.95),ecdf_h)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.