speclmb.test | R Documentation |
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.
speclmb.test(
reg.Obj,
Kern = "Euclid",
B = 199,
wmat = NULL,
cl = NULL,
cluster = NULL
)
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 |
the p-value, test statistic,
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.