Learn R Programming

met (version 0.1.0)

ks_stat: Kolmogorov-Smirnov statistics

Description

Compute the Kolmogorov-Smirnov statistics for each individual covariate in x.

Usage

ks_stat(x,z)

Arguments

x

A matrix with length(z) rows giving the covariates.

z

A vector whose ith coordinate is 1 for a treated unit and is 0 for a control.

Value

A vector of Kolmogorov-Smirnov statistics for each column of x.

Examples

Run this code
# NOT RUN {
library(optmatch)
data("SSRI")
attach(SSRI)
X<-cbind(female,black,education)
dist<-DiPs::maha_dense(z,X)
o<-DiPs::match(z, dist, SSRI)
M0<-o$data
Xm<-cbind(M0$female,M0$black,M0$education)
ks_stat(Xm,M0$z)
detach(SSRI)
# }

Run the code above in your browser using DataLab