chorussell.check: Checks and updates the input in the 'chorussell' procedure

View source: R/chorussell.R

chorussell.checkR Documentation

Checks and updates the input in the chorussell procedure

Description

This function checks and updates the input from the user in the chorussell function. If there is any invalid input, the function will be terminated and error messages will be printed.

Usage

chorussell.check(
  data,
  lpmodel,
  beta.tgt,
  R,
  Rmulti,
  kappa,
  norm,
  n,
  estimate,
  solver,
  ci,
  alpha,
  tol,
  progress
)

Arguments

data

An data frame or a matrix.

lpmodel

The lpmodel object.

beta.tgt

The value to be tested.

R

The number of bootstrap replications.

Rmulti

The multiplier for the number of bootstrap replications. The product of Rmulti and R refers to the maximum number of bootstrap replications to be conducted if there are errors.

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.

ci

A boolean variable that indicates whether a p-value or a (1-\alpha)-confidence interval is returned. If ci is TRUE, then a confidence interval is returned. Otherwise, a p-value is returned.

alpha

The significance level. This can be a vector.

tol

The tolerance level in the bisection procedure.

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 the updated parameters back to the function chorussell. The following information are updated:

  • ci

  • data

  • solver

  • solver.name

  • test.logical

  • n

  • logical.lb

  • logical.ub


conroylau/lpinfer documentation built on Sept. 5, 2024, 9 p.m.