estbounds | R Documentation |
This function estimates the bounds subject to the shape constraints. The estimation is done via a two-step procedure with either the 1-norm or the 2-norm.
estbounds(
data = NULL,
lpmodel,
kappa = 0,
norm = 2,
estimate = TRUE,
solver = NULL
)
data |
An |
lpmodel |
The |
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. |
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 |
The following input for norm
will be interpreted as the
1-norm:
1
(numeric
)
"1"
(string
)
"L1"
"one"
"o"
"taxicab"
The following input for norm
will be interpreted as the 2-norm:
2
(numeric
)
"2"
(string
)
"L2"
"two"
"t"
"e"
"euclidean"
Returns the bounds subject to the shape constraints.
ub |
The upper bound. |
lb |
The lower bound. |
mincriterion |
The objective value of the first-stage problem (i.e.
|
est |
The indicator of whether estimation is involved in the estimation. |
call |
The function that has been called. |
norm |
The norm used. |
ub.status |
The status of the optimization problem for the upper bound. |
lb.status |
The status of the optimization problem for the lower bound. |
solver |
The name of the solver used. |
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) estbounds(data = data, lpmodel = lpm, norm = 2, solver = "gurobi", estimate = TRUE)
More examples can be found in the estbounds_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.