| new_dScoreTest | R Documentation |
Internal worker that builds a dScoreTest object from a fixed
three-way (or two-way) sample split. Called by dScoreTest.
Splits, hunting algorithm, and predict semantics are taken as fully
resolved arguments — no defaults are inferred from the data.
new_dScoreTest(
y,
X,
idx.hunt,
idx.debias,
idx.test,
score_fun,
weight_fun,
fit_method,
wls_method,
hunt.style = "optimal",
hunt.method = "customized",
debias.method = "standard",
debias_fun = debias_standard,
fit_hunt_method = NULL,
wls_hunt_method = NULL,
X.cols.hunt = 1:ncol(X),
binary.y = FALSE,
trim.outlier.hunt = TRUE,
predict_fun = stats::predict,
predict_fun_hunt = stats::predict,
arg.fit_method = NULL,
arg.wls_method = NULL,
arg.fit_hunt_method = NULL,
arg.wls_hunt_method = NULL
)
y |
Numeric response vector of length n. |
X |
Numeric covariate matrix of dimension n x p. |
idx.hunt |
Integer indices into |
idx.debias |
Integer indices into |
idx.test |
Integer indices into |
score_fun |
Function with signature |
weight_fun |
Function with signature |
fit_method |
Function with signature |
wls_method |
Function with signature |
hunt.style |
One of |
hunt.method |
String for the hunting method. |
debias.method |
String for the debiasing method, recorded in the
returned object's |
debias_fun |
Function performing the debiasing, with the same signature
as |
fit_hunt_method |
Required when |
wls_hunt_method |
Required when |
X.cols.hunt |
Integer or name vector selecting which columns of
|
binary.y |
Logical. When |
trim.outlier.hunt |
Logical. Passed to the chosen |
predict_fun |
Function with signature |
predict_fun_hunt |
Function with signature |
arg.fit_method, arg.wls_method, arg.fit_hunt_method, arg.wls_hunt_method |
Named lists of additional arguments forwarded to the corresponding
fitter via |
A list of class "dScoreTest" with elements:
t.statDebiased test statistic
\sqrt{n_{\mathrm{test}}}\,\bar{L}/\hat{\sigma}_L.
p.valOne-sided p-value (right tail of the standard normal).
residsScore residuals on the test subsample.
hOrthogonalized hunted direction on the test subsample.
h.rawHunted direction before the outer debias projection.
hunted_funThe debiased hunted function
\hat{h} - \hat{m}_{\hat{h}}, a function that can be applied to X.
DataList with X, y, and the three index
vectors.
CallNamed list of methods,
hunt.style, hunt.method, debias.method, both
predict functions, and the four arg.* lists.
dScoreTest, hunt_optimal,
hunt_wls, hunt_vanilla
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.