| hunt_optimal | R Documentation |
Hunt by fitting residuals on X optimally, trained by solving a weighted least squares. The hunted function is also pre-debiased. This is the procedure of Section 2.2.1 of Dhawan, Guo and Shah (2026).
hunt_optimal(
wls_hunt_method,
wls_method,
score_fun,
weight_fun,
fit,
y,
X,
X.cols = 1:ncol(X),
binary.y = FALSE,
trim.outlier = TRUE,
arg.wls_hunt_method = NULL,
arg.wls_method = NULL,
predict_fun = stats::predict,
predict_fun_hunt = stats::predict
)
wls_hunt_method |
Function with signature |
wls_method |
Function with signature |
score_fun |
Function with signature |
weight_fun |
Function with signature |
fit |
Fitted null model. Must support |
y |
Response vector of length n. |
X |
Covariates of dim n x p. |
X.cols |
Subset of covariates to hunt. Default |
binary.y |
Set to |
trim.outlier |
If |
arg.wls_hunt_method |
Named list of additional arguments passed to
|
arg.wls_method |
Named list of additional arguments passed to
|
predict_fun |
Function with signature |
predict_fun_hunt |
Function with signature |
If y is binary, then set binary.y=TRUE. Meanwhile,
predict_fun(fit, X, type="response") must output the predicted probabilities.
An object of class "hunt", a list with elements:
hunt.fitThe fitted hunt model produced by
wls_hunt_method.
trim.boundsThe Tukey IQR trimming bounds, or
c(-Inf, Inf) when trim.outlier = FALSE.
predict_fun_huntThe prediction function for
hunt.fit, as supplied.
X.colsThe columns of X used for the hunt, as
supplied.
hA function with signature h(X) giving the
orthogonalized hunted signal.
Dhawan, A., Guo, F. R. and Shah, R. D. (2026). The debiased score test: hunt-and-test for semiparametric hypotheses. arXiv:2607.28861. https://arxiv.org/abs/2607.28861
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.