Description Usage Arguments Value Author(s) See Also Examples
Tests equality of distribution with a Kolmogorov-Smirnov for each covariates, between the two full groups or around the discontinuity threshold
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | covarTest_dis(
object,
bw,
exact = NULL,
p.adjust = c("none", "holm", "BH", "BY", "hochberg", "hommel", "bonferroni")
)
## S3 method for class 'rdd_data'
covarTest_dis(
object,
bw = NULL,
exact = FALSE,
p.adjust = c("none", "holm", "BH", "BY", "hochberg", "hommel", "bonferroni")
)
## S3 method for class 'rdd_reg'
covarTest_dis(
object,
bw = NULL,
exact = FALSE,
p.adjust = c("none", "holm", "BH", "BY", "hochberg", "hommel", "bonferroni")
)
|
object |
object of class rdd_data |
bw |
a bandwidth |
exact |
Argument of the |
p.adjust |
Whether to adjust the p-values for multiple testing. Uses the |
A data frame with, for each covariate, the K-S statistic and its p-value.
Matthieu Stigler <Matthieu.Stigler@gmail.com>
covarTest_mean
for the t-test of equality of means
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(house)
## Add randomly generated covariates
set.seed(123)
n_Lee <- nrow(house)
Z <- data.frame(z1 = rnorm(n_Lee, sd=2),
z2 = rnorm(n_Lee, mean = ifelse(house<0, 5, 8)),
z3 = sample(letters, size = n_Lee, replace = TRUE))
house_rdd_Z <- rdd_data(y = house$y, x = house$x, covar = Z, cutpoint = 0)
## Kolmogorov-Smirnov test of equality in distribution:
covarTest_dis(house_rdd_Z, bw=0.3)
## Can also use function covarTest_dis() for a t-test for equality of means around cutoff:
covarTest_mean(house_rdd_Z, bw=0.3)
## covarTest_dis works also on regression outputs (bw will be taken from the model)
reg_nonpara <- rdd_reg_np(rdd_object=house_rdd_Z)
covarTest_dis(reg_nonpara)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.