mincriterion: First-stage estimation procedure for 'estbounds'

View source: R/estbounds.R

mincriterionR Documentation

First-stage estimation procedure for estbounds

Description

This function evaluates the solution to stage 1 of the two-step procedure to obtain the estimated bounds in the estbounds procedure. This function can be used to evaluate both the estimation problem with the 1-norm or the 2-norm.

Usage

mincriterion(data = NULL, lpmodel, norm = 2, solver = NULL)

Arguments

data

An data frame or a matrix.

lpmodel

The lpmodel object.

norm

The norm used in the optimization problem. It can be either a 1-norm or a 2-norm. See the details section of estbounds for a list of accepted strings.

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 cplexAPI, gurobi, limSolve and Rcplex.

Value

Returns the solution to the first step of the two-step procedure and argument for the linear program.

objval

The optimal value.

x

The optimal point.

larg

The arguments for the estimation program.

norm

The norm used in the estimation problem.

solver

The solver used in the estimation problem

call

The details of the function that has been called.

Example

  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)
  mincriterion(data = data,
               lpmodel = lpm,
               norm = 2,
               solver = "gurobi")

More examples

More examples can be found in the mincriterion_example.R file under the example subdirectory of the installation directory for the lpinfer package.


conroylau/lpinfer documentation built on Oct. 23, 2022, 9:21 a.m.