Learn R Programming

RegCombin (version 0.4.1)

select_epsilon: Function for the data-driven selection of the epsilon tuning parameter

Description

Function for the data-driven selection of the epsilon tuning parameter

Usage

select_epsilon(
  sam1,
  eps_default,
  Xc_x,
  Xnc,
  Xc_y,
  Y,
  values,
  dimXc,
  dimXnc,
  nb_pts,
  lim,
  weights_x,
  weights_y,
  refs0,
  grid = 30,
  constraint = NULL,
  c_sign = NULL,
  nc_sign = NULL,
  meth = "adapt",
  nbCores = 1,
  version_sel = "first",
  alpha = 0.05,
  ties = FALSE
)

Value

a matrix containing the values of the selected epsilon(q) for q directions in sam1.

Arguments

sam1

the matrix containing the directions q on which to compute the selected rule for epsilon(q)

eps_default

If grid =NULL, then epsilon is taken equal to eps_default.

Xc_x

the common regressor on the dataset (Xnc,Xc). Default is NULL.

Xnc

the noncommon regressor on the dataset (Xnc,Xc). No default.

Xc_y

the common regressor on the dataset (Y,Xc). Default is NULL.

Y

the outcome variable. No default.

values

the different unique points of support of the common regressor Xc.

dimXc

the dimension of the common regressors Xc.

dimXnc

the dimension of the noncommon regressors Xnc.

nb_pts

the constant C in DGM for the epsilon_0, the lower bound on the grid for epsilon, taken equal to nb_pts*ln(n)/n. Default is 1 without regressors Xc, 3 with Xc.

lim

the lim number of observations under which we do no compute the conditional variance.

weights_x

the sampling weights for the dataset (Xnc,Xc).

weights_y

the sampling weights for the dataset (Y,Xc).

refs0

indicating the positions in the vector values corresponding to the components of betac.

grid

the number of points for the grid search on epsilon. Default is 30. If NULL, then epsilon is taken fixed equal to eps_default.

constraint

a vector indicating the different constraints in a vector of the size of X_c indicating the type of constraints, if any on f(X_c) : "concave", "concave", "nondecreasing", "nonincreasing", "nondecreasing_convex", "nondecreasing_concave", "nonincreasing_convex", "nonincreasing_concave", or NULL for none. Default is NULL, no contraints at all.

c_sign

sign restrictions on the commonly observed regressors: -1 for a minus sign, 1 for a plus sign, 0 otherwise. Default is NULL, i.e. no constraints.

nc_sign

sign restrictions on the non-commonly observed regressors Xnc: -1 for a minus sign, 1 for a plus sign, 0 otherwise. Default is NULL, i.e. no constraints.

meth

the method for the choice of epsilon, either "adapt", i.e. adapted to the direction or "min" the minimum over the directions. Default is "adapt".

nbCores

number of cores for the parallel computation. Default is 1.

version_sel

version of the selection of the epsilon, "first" indicates no weights, no ties, same sizes of the two datasets; "second" otherwise. Default is "second".

alpha

the level for the confidence regions. Default is 0.05.

ties

Boolean indicating if there are ties in the dataset. Default is FALSE.