interpolation.matrix.func: Assumes that cplex.fhat is a decreasing/increasing/simple...

Description Usage Arguments Value Examples

View source: R/Main.R

Description

Assumes that cplex.fhat is a decreasing/increasing/simple quasiconvex, fit obtained from the matrix X of regressors and some response vector. This function will take as inputs, the matrix X, the fitted vector cplex.fhat, a matrix nondatapoint_matrix whose rows may not be among those of X, and a categorical variable Monotone which denotes the type of regression in terms of monotonicity. It will return a quasiconvex and monotone (type of monotonicity determined by the user entered option for the variable Monotone) function evaluated at the rows of the matrix nondatapoint_matrix, which is an extrapolation of the fitted values in the vector cplex.fhat.

Usage

1
2
3
4
5
6
interpolation.matrix.func(
  X,
  cplex.fhat,
  nondatapoint_matrix,
  Monotone = c("non.inc", "non.dec", "none")
)

Arguments

X

An n by d matrix of regressors.

cplex.fhat

An n by 1 vector of fitted values.

nondatapoint_matrix

An N by d matrix whose rows may not be among the rows of X.

Monotone

A categorical variable denoting the type of regression in terms of monotonicity. 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.

Value

A vector, representing a quasiconvex and monotone (type of monotonicity determined by the user entered option for the input variable Monotone) function evaluated at the rows of the matrix nondatapoint_matrix, which is an extrapolation of the fitted values in the vector cplex.fhat.

Examples

1
2
3
4
5
6
7
8
library(MASS)
X = mvrnorm(20,rep(0,8), diag(8), tol=1e-06,empirical=FALSE)
y = exp(-rowSums(X)) + rnorm(20)

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)
Xnondata = mvrnorm(60,rep(0,8), diag(8), tol=1e-06,empirical=FALSE)
X = rbind(X,Xnondata)
out=interpolation.matrix.func(X,ret$f.hat,Xnondata,Monotone="non.inc")

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