Description Usage Arguments Value Examples
This function is an internal function called inside function "ivqr_fit()"
1 2 3 4 |
D |
data for endogenous variable D |
X |
data for exogenous variable X |
Z |
data for instrumental variable Z |
tau |
tau in quantile regression |
O_pos |
index for residuals whose sign are fixed as positive |
O_neg |
index for residuals whose sign are fixed as negative |
eps |
a small number |
M |
a large number |
TimeLimit |
gurobi parameter |
lpsolver |
"gurobi","cplexapi","lpsolveapi" |
A list containing the result of short regression, p value and corresponding L_n
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | n = 100
pD = 3
angrist_data = angrist(n, pD)
Y = angrist_data$Y
X = matrix(1, n, 1)
Z = angrist_data$Z
D = angrist_data$D
homoskedastic = FALSE
kernel = "Powell"
XZ = as.matrix(cbind(X, Z))
PI_XZ = XZ %*% solve(t(XZ) %*% XZ) %*% t(XZ)
Phi_CH = PI_XZ %*% D
J = 2
test_stat_freq_D(
j = J,
Beta_j_null = 0.1,
B = Phi_CH[, J, drop = FALSE],
Phi = Phi_CH[, -J, drop = FALSE],
Y = Y,
D = D,
X = X,
Z = Z,
tau = 0.5,
homoskedastic = homoskedastic,
kernel = kernel,
lpsolver = "gurobi"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.