KS_distance: Kolmogorov-Smirnov distance

Description Usage Arguments Value Examples

View source: R/pdf_distances.R

Description

KS_distance calculates the Kolmogorov-Smirnov distance between two pdfs.

Usage

1
KS_distance(theta, p_theta, q_theta)

Arguments

theta

a vector of numerics containing values of the RV θ

p_theta

a vector of numerics containing values of the pdf p at locations theta

q_theta

a vector of numerics containing values of the pdf q at locations theta

Value

The Kolmogorov-Smirnov distance between p and q

Examples

1
2
3
theta=seq(from=-5,to=5,by=0.1)
p_theta = dnorm(theta,mean = 0.2,sd = 1)
q_theta = dnorm(theta,mean = 0.25,sd = 0.5)

exPrior documentation built on Nov. 15, 2019, 1:07 a.m.