test_stat_freq_X: Return the results of inverse quantile regression without the...

Description Usage Arguments Value Examples

Description

This function is an internal function called inside function "ivqr_fit()"

Usage

1
2
3
4
test_stat_freq_X(j, Beta_j_null, B = NULL, Phi = NULL, alpha = 0.1,
  Y, D, X, Z, tau = 0.5, O_pos = NULL, O_neg = NULL, eps = 1e-14,
  M = 10, TimeLimit = 300, homoskedastic = FALSE,
  kernel = "Powell", lpsolver = lpsolver)

Arguments

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"

Value

A list containing the result of short regression, p value and corresponding L_n

Examples

 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 = 1
test_stat_freq_X(
 j = J,
 Beta_j_null = 0.1,
 B = NULL,
 Phi = Phi_CH[, -J, drop = FALSE],
 Y = Y,
 D = D,
 X = X,
 Z = Z,
 tau = 0.5,
 homoskedastic = homoskedastic,
 kernel = kernel,
 lpsolver = "gurobi"
 )

ChenyueLiu/ivqr documentation built on Aug. 9, 2020, 7:49 p.m.