powered by
A function for variance estimation
var_est(y, W, H_Q)
a conservative estimate of the standard deviation of the test statistic.
a vector of length I containing the value of test statistics from each matched set
weight vector of length I.
hat matrix corresponding to a matrix Q with dimension I by L.
test_stat <- c(1, 2, 1.5) weight <- rep(1, 3) Q <- matrix(1:9, nrow = 3, ncol = 2) hat <- Q %*% solve(t(Q) %*% Q) %*% t(Q)
Run the code above in your browser using DataLab