dkqs.bs.fn: Carries out one bootstrap replication for the 'dkqs'...

View source: R/dkqs.R

dkqs.bs.fnR Documentation

Carries out one bootstrap replication for the dkqs procedure

Description

This function carries out the one bootstrap replication of the DKQS procedure This function is used in the dkqs.bs function via the future_map function.

Usage

dkqs.bs.fn(
  x,
  data,
  lpmodel,
  beta.obs.hat,
  beta.tgt,
  s.star.list,
  tau.list,
  solver,
  n,
  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

An lpmodel object.

beta.obs.hat

The value of sample \hat{\bm{β}}_{\mathrm{obs}} from the lpmodel object.

beta.tgt

The value to be tested.

s.star.list

The list of values of \hat{\bm{s}}^\star \equiv \bm{A}_{\mathrm{obs}}\hat{\bm{x}}_n^\star in the cone-tightening procedure for each τ.

tau.list

The list of feasible parameters τ.

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.

n

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

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 DKQS procedure:

Ts

A bootstrap test statistic.

beta

A bootstrap estimator.

param

A list of problematic parameters in the DKQS test.

msg

An error message (if applicable).


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