subsample.bs: Bootstrap procedure for the 'subsample' procedure

View source: R/subsample.R

subsample.bsR Documentation

Bootstrap procedure for the subsample procedure

Description

This function carries out the bootstrap procedure of the subsample procedure This function supports parallel programming via the furrr package.

Usage

subsample.bs(
  data,
  i1,
  lpmodel,
  beta.tgt,
  norm,
  solver,
  replace,
  progress,
  m,
  n,
  omega.hat,
  df.error,
  eval.count,
  error.id,
  seed.list
)

Arguments

data

An data frame or a matrix.

i1

The last index to be evaluated.

lpmodel

An lpmodel object.

beta.tgt

The value to be tested.

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.

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.

replace

A boolean variable to indicate whether the function samples the data with or without replacement.

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.

m

The size of each subsample.

n

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

omega.hat

The estimator of the asymptotic variance.

df.error

The consolidated data frame of error messages.

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.

error.id

The list of ID that corresponds to problematic bootstrap draws.

seed.list

The list of RNG states and the corresponding iterations.

Value

Returns a list of output that are obtained from the subsampling procedure:

T.sub

The bootstrap test statistics from the subsampling procedure.

beta.sub

The bootstrap estimators for the beta component.

df.error

A table showing the id of the bootstrap replication(s) with error(s) and the corresponding error message(s).

R.eval

The number of bootstrap replications that have been conducted.

R.succ

The number of successful bootstrap replications.


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