Quasiconvex.cplex: Computes quasiconvex and decreasing least squares estimate...

Description Usage Arguments Value Examples

Description

Computes quasiconvex and decreasing least squares estimate using CPLEX . This function will take in the multivariate regressors and the response, and return the least squares estimates at the regressors, based on the response. X,y and Monotone must be supplied, though all other parameters have pre-set values the user can proceed with unless they wish to change the prior specification.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Quasiconvex.cplex(
  X,
  y,
  Monotone = c("non.inc", "non.dec", "none"),
  Max.b = 10^4,
  MM = 10^4,
  ep = 0.001,
  time.limit = 200,
  tol = 1e-06,
  output.flag = 1
)

Arguments

X

An n by d matrix of regressors.

y

An n by 1 vector of responses.

Monotone

A categorical variable indicating the type of regression. The user must input one of the following three types: "non.inc": means nonincreasing, quasiconvex regression, "non.dec": means nondecreasing, quasiconvex regression, "non": means quasiconvex regression.

Max.b

Bound on the absolute values of the variables.

MM

The 'M' parameter in the big-M method applied by us.

ep

A small positive quantity to convert open constraints to close constraints.

time.limit

Time limit in seconds of call to optimizer. Can be any nonnegative number.

tol

Relative MIP optimality gap tolerance. Can be any nonnegative number. Default 1e-4.

output.flag

Turn CPLEX output on (1) or off(0).

Value

A list of objects that contain among other things,the least squares estimates at the regressors (within f.hat) and negative of the optimal objective function (within least.squares).

Examples

1
2
3
4
5
6
7
8
9
n=20
d=8
library(MASS)
## We demonstrate an example, where the regressor matrix X is Gaussian, and the response vector y
## is a noisy version of a real-valued quasiconvex, decreasing function applied to the rows of X.
X = mvrnorm(n,rep(0,d), diag(d), tol=1e-06,empirical=FALSE)
y = exp(-rowSums(X)) + rnorm(n)

ret = Quasiconvex.cplex(X, y,   Monotone = "non.inc", Max.b = 10^4, MM =10^4, ep =0.001,  time.limit= 200, tol =  1e-06,  output.flag = 1)

somabhamukherjee/QuasiconvexLSE documentation built on June 17, 2021, 6:49 a.m.