WildBootTests.wildboottest — Functionwildboottest([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 Float64R::AbstractMatrixandr::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::AbstractMatrixandr1::AbstractVector: model constraints; same format as forRandrclustid::AbstractVecOrMat{<:Integer}: data vector/matrix of error and bootstrapping cluster identifiers; see Notesnbootclustvar::Integer=1: number of bootstrap-clustering variablesnerrclustvar::Integer=nbootclustvar: number of error-clustering variableshetrobust::Bool=true: true unless errors are treated as iidfeid::AbstractVector{<:Integer}: data vector for fixed effect group identifierfedfadj::Bool=true: true if small-sample adjustment should reflect number of fixed effects (if any)obswt::AbstractVector: observation weight vector; default is equal weightingfweights::Bool=false: true for frequency weightsmaxmatsize::Number: maximum size of auxilliary weight matrix (v), in gigabytesptype::PType=symmetric: p value type (symmetric,equaltail,lower,upper)bootstrapc::Bool=false: true to request bootstrap-c instead of bootstrap-tLIML::Bool=false: true for LIML or Fuller LIMLFuller::Number: Fuller factorkappa::Number: fixed κ for k-class estimationARubin::Bool=false: true for Anderson-Rubin testsmall::Bool=true: true for small-sample correctionsscorebs::Bool=false: true for score bootstrap instead of wild bootstrapreps::Integer=999: number of bootstrap replications;reps= 0 requests classical Rao (or Wald) test ifimposenull=true(orfalse)imposenull::Bool=true: true to impose nullauxwttype::AuxWtType=rademacher: auxilliary weight type (rademacher,mammen,webb,normal,gamma)rng::AbstractRNG=MersenneTwister(): randon number generatorlevel::Number=.95: significance level (0-1)rtol::Number=1e-6: tolerance for CI bound determinationmadjtype::MAdjType=nomadj: multiple hypothesis adjustment (nomadj,bonferroni,sidak)NH0::Integer=1: number of hypotheses tested, including one being tested nowML::Bool=false: true for (nonlinear) ML estimationscores::AbstractVecOrMat: for ML, pre-computed scoresbeta::AbstractVector: for ML, parameter estimatesA::AbstractMatrix: for ML, covariance estimatesgridmin: vector of graph lower bounds, max length 2,missingentries ask wildboottest() to choosegridmax: vector of graph upper boundsgridpoints: vector of number of sampling pointsdiststat::DistStatType=nodiststat: t to save bootstrap distribution of t/z/F/χ² statistics; numer to save numerators thereofgetCI::Bool=true: whether to return CIgetplot::Bool=getCI: whether to generate plot datagetauxweights::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:
- Variables only used to define bootstrapping clusters, as in the subcluster bootstrap.
- Variables used to define both bootstrapping and error clusters.
- 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.
WildBootTests.AuxWtType — TypeAuxilliary weight types: rademacher, mammen, webb, normal, gamma
WildBootTests.PType — Typep value types: symmetric, equaltail, lower, upper
WildBootTests.MAdjType — TypeMultiple hypothesis adjustment types: nomadj, bonferroni, sidak
WildBootTests.DistStatType — TypeBootstrap distribution statistics optionally returned
WildBootTests.teststat — FunctionReturn test statistic subject to wild bootstrap test
WildBootTests.stattype — FunctionReturn type of test statistic subject to wild bootstrap test: "t", "z", "F", or "χ²"
WildBootTests.p — FunctionReturn p value from wild bootstrap test
WildBootTests.padj — FunctionReturnp p value from wild bootstrap test after multiple-hypothesis adjustment, if any
WildBootTests.reps — FunctionReturn requested number of replications in wild bootstrap test
WildBootTests.repsfeas — FunctionReturn actual number of replications in wild bootstrap test, subject to enumeration of Rademacher draws
WildBootTests.NBootClust — FunctionReturn number of bootstrapping clusters in wild bootstrap test
WildBootTests.dof — FunctionReturn degrees of freedom wild bootstrap test
WildBootTests.dof_r — FunctionReturn residual degrees of freedom wild bootstrap test
WildBootTests.plotpoints — FunctionReturn 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.
WildBootTests.peak — FunctionReturn parameter value with peak p value in wild bootstrap test
WildBootTests.CI — FunctionReturn confidence interval matrix from wild bootstrap test, one row per disjoint piece
WildBootTests.dist — FunctionReturn bootstrap distribution of statistic or statistic numerator in wild bootstrap test
WildBootTests.statnumer — FunctionReturn numerator of test statistic in wild bootstrap test
WildBootTests.statvar — FunctionReturn denominator of test statistic in wild bootstrap test
WildBootTests.auxweights — FunctionReturn auxilliary weight matrix for wild bootstrap