mmdlmrelv.b_test: MMD Relevance Test

View source: R/dCovReg.R

mmdlmrelv.b_testR Documentation

MMD Relevance Test

Description

mmdlmrelv.b_test conducts the Su \& Zheng 2017 specification test on a linear model estimated with the MMD estimator. It is based on the wild bootstrap.

Usage

mmdlmrelv.b_test(
  X1,
  X2 = NULL,
  Z,
  B = 199,
  wmat = NULL,
  cl = NULL,
  cluster = NULL
)

Arguments

X1

an n x p1 matrix of endogenous covariates

X2

an n x p2 matrix of exogenous covariates

Z

an n x pz matrix of instruments

B

number of wild bootstrap samples. Defaults to 199

wmat

in case the n x B matrix of wild bootstrap weights are supplied by the user.

cl

an integer to indicate number of child-processes in pbapply::pbsapply().

cluster

vector of length n with cluster ids if cluster-robust wild-bootstrap is used

Value

the p-value, test statistic,

Examples

n=100; set.seed(12); X=rnorm(n); er=(rchisq(n,df=1)-1)/sqrt(2)
mmdlmrelv.b_test(X+er,abs(X),X^3) #multiple endogenous covariates
mmdlmrelv.b_test(cbind(X+er,X-(er)^3),Z=X^3) #multiple endogenous covariates


estsyawo/bayesprdopt documentation built on April 2, 2024, 2:18 p.m.