KS.stat: KS.stat

View source: R/helper_stat_calc.R

KS.statR Documentation

KS.stat

Description

Calculate classic (not shifted) KS statistic; code is a modified version of R's ks.test().

Usage

KS.stat(Y, Z, tau, alternative)

Arguments

Y

Observed outcome vector

Z

Treatment assigment vector

tau

Value of treatment effect for shifting Y1. Default is NULL (Y1 not shifted).

alternative

Direction of test ("two.sided", "less", "greater")

Details

If tau passed, Y1 will be shifted by tau.

Value

The value of the test.

See Also

detect_idiosyncratic

Examples

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)


hettx documentation built on Aug. 20, 2023, 1:06 a.m.