Learn R Programming

fwildclusterboot (version 0.3.4)

boot_algo2: Fast wild cluster bootstrap algorithm

Description

function that implements the fast bootstrap algorithm as described in Roodman et al (2019)

Usage

boot_algo2(
  preprocessed_object,
  boot_iter,
  point_estimate,
  impose_null,
  beta0,
  sign_level,
  param,
  seed,
  p_val_type,
  nthreads,
  type
)

Arguments

preprocessed_object

A list: output of the preprocess2 function.

boot_iter

number of bootstrap iterations

point_estimate

The point estimate of the test parameter from the regression model.

impose_null

If TRUE, the null is not imposed on the bootstrap distribution. This is what Roodman et al call the "WCU" bootstrap. With impose_null = FALSE, the null is imposed ("WCR").

beta0

Shifts the null hypothesis.

sign_level

The significance level.

param

name of the test parameter.

seed

the random seed. controls draw of bootstrap weights.

p_val_type

type Type of p-value. By default "two-tailed". Other options: "equal-tailed", ">", "<"

nthreads

The number of threads. Can be: a) an integer lower than, or equal to, the maximum number of threads; b) 0: meaning all available threads will be used; c) a number strictly between 0 and 1 which represents the fraction of all threads to use. The default is to use 50\ set permanently the number of threads used within this package using the function ...

type

character or function. The character string specifies the type of boostrap to use: One of "rademacher", "mammen", "norm" and "webb". Alternatively, type can be a function(n) for drawing wild bootstrap factors. "rademacher" by default.

Value

A list of ...