Learn R Programming

hettx (version 1.0.1)

rq_stat: rq_stat

Description

rq_stat is the Kolmogorov-smirnov statistic via quantile regression with covariates without further adjustment.

rq_stat_cond_cov does Kolmogorov-smirnov statistic via quantile regression with covariates, with a conditional approach; see Koenker and Xiao (2002).

rq_stat_uncond_cov implements a Kolmogorov-smirnov statistic via quantile regression with covariates, unconditional approach; see Firpo (2007).

Usage

rq_stat(Y, Z, rq.pts = seq(0.1, 0.9, by = 0.1))

rq_stat_cond_cov(Y, Z, X, rq.pts = seq(0.1, 0.9, by = 0.1))

rq_stat_uncond_cov(Y, Z, X, rq.pts = seq(0.1, 0.9, by = 0.1))

Value

The value of the test.

Arguments

Y

Observed outcome vector

Z

Treatment assigment vector

rq.pts

Sequence of quantile points at which to evaluate the test. Default is seq(.1, .9, by = .1). Should not go beyond 0 and 1.

X

Additional pre-treatment covariates to adjust for in estimation, but not to interact with treatment.

Details

Warning: This function supresses all warnings of the `rq()` method call.

Warning: This function supresses all warnings of the `rq()` method call.

Examples

Run this code
df <- make_randomized_dat( 1000, gamma.vec=c(1,1,1,2), beta.vec=c(-1,-1,1,0) )
rq_stat(df$Yobs, df$Z)

df <- make_randomized_dat( 1000, gamma.vec=c(1,1,1,2), beta.vec=c(-1,-1,1,0) )
rq_stat_cond_cov(df$Yobs, df$Z, df$A)

df <- make_randomized_dat( 1000, gamma.vec=c(1,1,1,2), beta.vec=c(-1,-1,1,0) )
rq_stat_uncond_cov(df$Yobs, df$Z, df$A)

Run the code above in your browser using DataLab