WildBootTests.wildboottestFunction

wildboottest([T::DataType=Float32,] R::AbstractMatrix, r::AbstractVector; resp, <optional keyword arguments>) -> WildBootTest.BoottestResult

Function to perform wild-bootstrap-based hypothesis test

Positional arguments

  • T::DataType: data type for inputs, results, and computations: Float32 (default) or Float64
  • R::AbstractMatrix and r::AbstractVector: required matrix and vector expressesing the null Rβ=r; see Notes

Required keyword argument

  • resp::AbstractVector: response/dependent variable (y/y₁)

Optional keyword arguments

  • predexog::AbstractVecOrMat: exogenous predictors, including constant term, if any (X/X₁)
  • predendog::AbstractVecOrMat: endogenous predictors (Y₂)
  • inst::AbstractVecOrMat: instruments (X₂)
  • R1::AbstractMatrix and r1::AbstractVector: model constraints; same format as for R and r
  • clustid::AbstractVecOrMat{<:Integer}: data vector/matrix of error and bootstrapping cluster identifiers; see Notes
  • nbootclustvar::Integer=1: number of bootstrap-clustering variables
  • nerrclustvar::Integer=nbootclustvar: number of error-clustering variables
  • hetrobust::Bool=true: true unless errors are treated as iid
  • feid::AbstractVector{<:Integer}: data vector for fixed effect group identifier
  • fedfadj::Bool=true: true if small-sample adjustment should reflect number of fixed effects (if any)
  • obswt::AbstractVector: observation weight vector; default is equal weighting
  • fweights::Bool=false: true for frequency weights
  • maxmatsize::Number: maximum size of auxilliary weight matrix (v), in gigabytes
  • ptype::PType=symmetric: p value type (symmetric, equaltail, lower, upper)
  • bootstrapc::Bool=false: true to request bootstrap-c instead of bootstrap-t
  • LIML::Bool=false: true for LIML or Fuller LIML
  • Fuller::Number: Fuller factor
  • kappa::Number: fixed κ for k-class estimation
  • ARubin::Bool=false: true for Anderson-Rubin test
  • small::Bool=true: true for small-sample corrections
  • scorebs::Bool=false: true for score bootstrap instead of wild bootstrap
  • reps::Integer=999: number of bootstrap replications; reps = 0 requests classical Rao (or Wald) test if imposenull = true (or false)
  • imposenull::Bool=true: true to impose null
  • auxwttype::AuxWtType=rademacher: auxilliary weight type (rademacher, mammen, webb, normal, gamma)
  • rng::AbstractRNG=MersenneTwister(): randon number generator
  • level::Number=.95: significance level (0-1)
  • rtol::Number=1e-6: tolerance for CI bound determination
  • madjtype::MAdjType=nomadj: multiple hypothesis adjustment (nomadj, bonferroni, sidak)
  • NH0::Integer=1: number of hypotheses tested, including one being tested now
  • ML::Bool=false: true for (nonlinear) ML estimation
  • scores::AbstractVecOrMat: for ML, pre-computed scores
  • beta::AbstractVector: for ML, parameter estimates
  • A::AbstractMatrix: for ML, covariance estimates
  • gridmin: vector of graph lower bounds, max length 2, missing entries ask wildboottest() to choose
  • gridmax: vector of graph upper bounds
  • gridpoints: vector of number of sampling points
  • diststat::DistStatType=nodiststat: t to save bootstrap distribution of t/z/F/χ² statistics; numer to save numerators thereof
  • getCI::Bool=true: whether to return CI
  • getplot::Bool=getCI: whether to generate plot data
  • getauxweights::Bool=false: whether to save auxilliary weight matrix (v)

Notes

T, ptype, auxwttype, madjtype, and diststat may also be strings. Examples: "Float32" and "webb".

The columns of R in the statement of the null should correspond to those of the matrix [predexog predendog], where predendog is non-empty only in regressions with instruments.

Order the columns of clustid this way:

  1. Variables only used to define bootstrapping clusters, as in the subcluster bootstrap.
  2. Variables used to define both bootstrapping and error clusters.
  3. Variables only used to define error clusters.

nbootclustvar is then the number of columns of type 1 or 2; nerrclustvar is the number of columns of type 2 or 3. Typically clustid is a single column of type 2.

wildboottest() does not handle missing data values: all data and identifier matrices must be restricted to the estimation sample.

source
WildBootTests.padjFunction

Returnp p value from wild bootstrap test after multiple-hypothesis adjustment, if any

source
WildBootTests.repsfeasFunction

Return actual number of replications in wild bootstrap test, subject to enumeration of Rademacher draws

source
WildBootTests.plotpointsFunction

Return data for confidence plot of wild bootstrap test. Return value is a 2-tuple with named entries X and p holding the confidence sampling locations and p values respectively. X is in turn a 1- or 2-tuple of vectors of sampling coordinates for each dimension of the tested hypothesis.

source
WildBootTests.CIFunction

Return confidence interval matrix from wild bootstrap test, one row per disjoint piece

source
WildBootTests.distFunction

Return bootstrap distribution of statistic or statistic numerator in wild bootstrap test

source