qconvcheck: Checks whether the points in the vector y are actually the...

Description Usage Arguments Value Examples

View source: R/Main.R

Description

Checks whether the points in the vector y are actually the outputs of a single quasiconvex function applied to the corresponding rows of the matrix X. This function will take the matrix X and the vector y as inputs, and return a string, indicating whether the vector y is or not a quasiconvex realization of X.

Usage

1
qconvcheck(X, y, tol = 0.001)

Arguments

X

An n by d matrix.

y

An n by 1 vector.

tol

A small positive quantity.

Value

A string, indicating whether the vector y is, or not a quasiconvex realization of X.

Examples

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

out = qconvcheck(X,y, tol = 1e-3)

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