fsst | R Documentation |
This module conducts inference in linear programs using the procedure by Fang, Santos, Shaikh and Torgovitsky (2020).
fsst(
data = NULL,
lpmodel,
beta.tgt,
R = 100,
Rmulti = 1.25,
lambda = NA,
rho = 1e-04,
n = NULL,
weight.matrix = "diag",
solver = NULL,
progress = TRUE,
sqrtm.method = function(m) pracma::sqrtm(m)$B,
sqrtm.tol = .Machine$double.eps^(1/2),
previous.output = NA
)
data |
An |
lpmodel |
The |
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 |
lambda |
Parameter used to obtain the restricted estimator
|
rho |
Parameter used in the studentization of matrices. |
n |
The sample size. This is only required if |
weight.matrix |
The option used in the weighting matrix. There are three options available:
|
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 |
sqrtm.method |
The method used to obtain the matrix square root in
the |
sqrtm.tol |
The absolute tolerance used to check whether the matrix
square root is correct. This is done by checking whether the Frobenius
norm is smaller than the tolerance level, i.e., when |
previous.output |
The list of outputs obtained from the previous
evaluation of the procedure. This is only used in the
|
The following components are required in the lpmodel
for the
fsst
procedure:
A.tgt
A.obs
A.shp
beta.obs
beta.shp
Returns the following information:
pval |
A table of |
cv.table |
A table of sample and bootstrap Cone and Range test statistics. |
call |
The matched call. |
range |
The sample range test statistic. |
cone |
The sample cone test statistic. |
test |
The sample test statistic. |
cone.n.list |
The list of bootstrap cone test statistics. |
range.n.list |
The list of bootstrap range test statistics. |
solver.name |
Name of the solver used. |
rho |
The value of |
rhobar.i |
The regularization parameter used for the Cone studentization matrix. |
lambda.data |
The value of the data-driven |
var.method |
The method used in obtaining the asymptotic variance
of |
test.logical |
An indicator variable for whether the computation has
been conducted. If |
logical.lb |
Logical lower bound. |
logical.ub |
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) fsst(data = data, lpmodel = lpm, beta.tgt = .2, R = 100, lambda = .2, rho = 1e-4, weight.matrix = "identity", solver = "gurobi")
More examples can be found in the fsst_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.