speclmb.test: ICM Specification Test for linear models

View source: R/dCovReg.R

speclmb.testR Documentation

ICM Specification Test for linear models

Description

speclmb.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

speclmb.test(
  reg.Obj,
  Kern = "Euclid",
  B = 199,
  wmat = NULL,
  cl = NULL,
  cluster = NULL
)

Arguments

reg.Obj

is a regression output

Kern

type of kernel desired

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

## Generate data and run MMD regression
n=100; set.seed(12); X = rnorm(n); er = rnorm(n)
Y1=X+er/sqrt(1+X^2); Y2=X+abs(X)+er/sqrt(1+X^2)
speclmb.test(imlmreg2.fit(Y1,X,X)) #null
speclmb.test(imlmreg2.fit(Y2,X,X)) #alternative


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