chorussell | R Documentation |
This function conducts inference using the procedure proposed by Cho and Russell (2019).
chorussell(
data = NULL,
lpmodel,
beta.tgt = NULL,
n = NULL,
R = 100,
Rmulti = 1.25,
kappa = 0,
norm = 2,
estimate = TRUE,
solver = NULL,
ci = NULL,
alpha = 0.05,
tol = 1e-04,
progress = TRUE,
remove.const = TRUE,
previous.output = NA
)
data |
An |
lpmodel |
The |
beta.tgt |
The value to be tested. |
n |
The sample size. This is only required if |
R |
The number of bootstrap replications. |
Rmulti |
The multiplier for the number of bootstrap replications. The
product of |
kappa |
The tuning parameter used in the second step of the two-step procedure for obtaining the bounds subject to the shape constraints. It can be any nonnegative number or a vector of nonnegative numbers. |
norm |
The norm used in the optimization problem. It can be either a
1-norm or a 2-norm. See the details section of
|
estimate |
A boolean variable to indicate whether the bounds should be estimated or not. |
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 |
ci |
A boolean variable that indicates whether a |
alpha |
The significance level. This can be a vector. |
tol |
The tolerance level in the bisection procedure. |
progress |
The boolean variable for whether the progress bars should
be displayed. If it is set as |
remove.const |
A boolean variable. This determine whether the constraints are to be removed. |
previous.output |
The list of outputs obtained from the previous
evaluation of the procedure. This is only used in the
|
See the details section of the estbounds
function for a list of strings acceptable for the option norm
.
The following components are required in the lpmodel
for the
Cho-Russell procedure:
A.tgt
A.obs
A.shp
beta.obs
beta.shp
The input beta.tgt
is not required when ci = TRUE
.
Returns the following list of output:
ub |
The upper bound from original data. |
lb |
The lower bound from original data. |
ub.bs |
The list of upper bounds from bootstrap data. |
lb.bs |
The list of lower bounds from bootstrap data. |
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. |
ci |
A boolean variable that indicates whether a |
pval |
|
c.ub |
The upper bound of the |
c.lb |
The lower bound of the |
alpha |
The significance level. |
iter |
The total number of iterations (if |
unique |
A boolean variable showing whether the solution is unique. |
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) chorussell(data = data, lpmodel = lpm, beta.tgt = .2, R = 100, norm = 2, ci = TRUE, solver = "gurobi")
More examples can be found in the chorussell_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.