powered by
Calculate classic (not shifted) KS statistic; code is a modified version of R's ks.test().
KS.stat(Y, Z, tau, alternative)
The value of the test.
Observed outcome vector
Treatment assigment vector
Value of treatment effect for shifting Y1. Default is NULL (Y1 not shifted).
Direction of test ("two.sided", "less", "greater")
If tau passed, Y1 will be shifted by tau.
detect_idiosyncratic
df <- make.randomized.dat( 1000, gamma.vec=c(1,1,1,2), beta.vec=c(-1,-1,1,0) ) KS.stat(df$Yobs, df$Z)
Run the code above in your browser using DataLab