Description Usage Arguments Value Examples
This function is an internal function called inside function "ivqr_fit()"
1 2 3 4 | ivqr_confint(test_stat = test_stat_freq_D, j = 1, B = NULL,
Phi = NULL, Beta_j_hat = 1, Srate = 1/2, alpha = 0.1, Y, D, X, Z,
tau = 0.5, width_ratio = 1, M = 10, homoskedastic = FALSE,
kernel = "Powell", lpsolver = NULL)
|
D |
data for endogenous variable D |
X |
data for exogenous variable X |
Z |
data for instrumental variable Z |
tau |
tau in quantile regression |
M |
a large number |
lpsolver |
"gurobi","cplexapi","lpsolveapi" |
the estimates, upper bound and lower bound
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 28 29 30 31 32 33 | n=50
pD=3
sample_data<-chen_lee(n,pD)
Y=sample_data$Y
D=sample_data$D
Z=sample_data$Z
X = matrix(1, n, 1)
XZ = cbind(X, Z)
PI_XZ = XZ %*% solve(t(XZ) %*% XZ) %*% t(XZ)
Phi_CH = PI_XZ %*% D
lpsolver="gurobi"
tau = 0.5
iqr_milp_fit = iqr_milp(Y, D, X, Z, tau = tau, lpsolver = lpsolver)
B_D_hat = iqr_milp_fit$B_D
J=1
ivqr_confint(
test_stat = test_stat_freq_D,
j = J,
B = Phi_CH[, J, drop = FALSE],
Phi = Phi_CH[, -J, drop = FALSE],
Beta_j_hat = B_D_hat[J],
Srate = 1 / 2,
alpha = 0.1,
Y=Y,
D=D,
X=X,
Z=Z,
tau = tau,
M = 10,
homoskedastic = FALSE,
kernel = "Gaussian",
lpsolver = lpsolver
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.