chorussell.bs.fn: Carries out one bootstrap replication for the Cho-Russell...

View source: R/chorussell.R

chorussell.bs.fnR Documentation

Carries out one bootstrap replication for the Cho-Russell procedure

Description

This function carries out one bootstrap replication of the Cho-Russell procedure. This function is used in the chorussell.bs function via the future_map function.

Usage

chorussell.bs.fn(
  x,
  data,
  lpmodel,
  beta.tgt,
  kappa,
  norm,
  n,
  estimate,
  solver,
  pbar,
  eval.count,
  n.bs,
  any.list,
  progress
)

Arguments

x

This is either the list of indices that represent the bootstrap replications, or the list of bootstrap components of the lpmodel object passed from the user.

data

An data frame or a matrix.

lpmodel

The lpmodel object.

beta.tgt

The value to be tested.

kappa

The tuning parameter used in the second step of the two-step procedure for obtaining the bounds subject to the shape constraints. It can be any nonnegative number or a vector of nonnegative numbers.

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.

n

The sample size. This is only required if data is omitted in the input.

estimate

A boolean variable to indicate whether the bounds should be estimated or not.

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.

pbar

The progress bar object.

eval.count

The count for the number of times the future_map function has been called. If this object is zero, it means that the future_map function is being called for the first time in this subprocedure. Otherwise, it means that the future_map function has been called for more than once. This situation typically refers to the situations where there are some errors in the first time of the replications.

n.bs

The total number of replications to be conducted in this procedure.

any.list

This object contains information on whether any components in the lpmodel object is a list.

progress

The boolean variable for whether the progress bars should be displayed. If it is set as TRUE, the progress bars will be displayed while the code is running.

Value

Returns a list of output that are obtained from the Cho-Russell procedure:

ub

The bootstrap estimate of the upper bound.

ub

The bootstrap estimate of the lower bound.

kappa.error

The kappa parameter that leads to an error (if applicable).

msg

An error message (if applicable).


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