dkqs | R Documentation |
This module conducts inference using the cone-tightening procedure proposed by Deb, Kitamura, Quah and Stoye (2018).
dkqs(
data = NULL,
lpmodel,
beta.tgt,
R = 100,
Rmulti = 1.25,
tau = NULL,
n = NULL,
solver = NULL,
progress = TRUE,
previous.output = NA
)
data |
An |
lpmodel |
An |
beta.tgt |
The value to be tested. |
R |
The number of bootstrap replications. |
Rmulti |
The multiplier for the number of bootstrap replications. The
product of |
tau |
The value of the tuning parameter |
n |
The sample size. This is only required if |
solver |
The name of the linear and quadratic programming solver that
is used to obtain the solution to linear and quadratic programs.
The solvers supported by this package are |
progress |
The boolean variable for whether the progress bars should
be displayed. If it is set as |
previous.output |
The list of outputs obtained from the previous
evaluation of the procedure. This is only used in the
|
If the value of the test statistic T_n
is zero, the bootstrap
procedure will be skipped and the p
-value is zero.
The following components are required in the lpmodel
for the
DKQS procedure:
A.tgt
A.obs
beta.obs
Returns the following list of outputs:
pval |
A table of |
tau.feasible |
The list of |
tau.infeasible |
The list of |
tau.max |
The maximum value of the feasible |
T.n |
The test statistic |
T.bs |
The list of bootstrap test statistics
|
solver |
The solver used. |
cv.table |
A table of critical values. |
call |
The function that has been called. |
test.logical |
An indicator variable for whether the computation has
been conducted. If |
logical.lb |
The logical lower bound. |
logical.ub |
The logical upper bound. |
df.error |
A table showing the id of the bootstrap replication(s) with error(s) and the corresponding error message(s). |
R.succ |
The number of successful bootstrap replications. |
source("./example/dgp_missingdata.R") # Change directory if necessary J <- 5 N <- 1000 data <- missingdata_draw(J = J, n = N, seed = 1, prob.obs = .5) lpm <- missingdata_lpm(J = J, info = "full", data = data) dkqs(data = data, lpmodel = lpm, beta.tgt = .2, R = 100, tau = sqrt(log(N)/N), solver = "gurobi")
More examples can be found in the dkqs_example.R
file
under the example
subdirectory of the installation directory for
the lpinfer
package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.