View source: R/np.lsqregression.R
| nplsqregbw | R Documentation |
nplsqregbw selects bandwidths and the scalar location-scale shift
parameter delta for nplsqreg by minimizing
leave-one-out check loss.
nplsqregbw(bws, ...)
## S3 method for class 'formula'
nplsqregbw(bws, data = NULL, tau = 0.5,
subset, na.action, ...)
## S3 method for class 'lsqregressionbandwidth'
nplsqregbw(bws, tau = bws$tau, ...)
## Default S3 method:
nplsqregbw(bws,
xdat = stop("invoked without data 'xdat'"),
ydat = stop("invoked without data 'ydat'"),
tau = 0.5,
tau.search = c("full", "refined"),
delta = NULL,
scale = NULL,
regtype = c("lc", "ll", "lp"),
regtype.pilot = c("auto", "ll", "lc", "lp"),
nomad = FALSE,
nomad.pilot = FALSE,
pilot.args = list(),
bandwidth.compute = TRUE,
delta.bounds = c(1e-4, 1 - 1e-4),
optim.control = list(maxit = 50L),
...,
nomad.opts = list())
These arguments identify the bandwidth specification, formula/data interface, and training data.
bws |
a formula, an |
data |
This argument belongs to the formula interface (including supported
formula-bearing bandwidth-object refits). Native calls must supply their
vectors, matrices or data frames directly, or use an optional data frame, list or environment containing the variables
in the model. If not found in |
subset |
an optional vector specifying a subset of observations to be used by the formula method. |
na.action |
a function specifying the action to take when missing values are found by the formula method. |
xdat |
a |
ydat |
a one dimensional numeric vector of dependent data. |
These arguments identify the quantile probabilities and how vector-tau
fits are orchestrated.
tau |
a numeric scalar or vector specifying the quantile probability or
probabilities |
tau.search |
either |
These arguments control or supply the conditional standard deviation used in the location-scale transformation.
scale |
an optional strictly positive scale vector interpreted as the
conditional standard deviation at the training observations. If
omitted, a pilot scale is computed automatically.
In formula calls, a full-length vector follows the formula's time
alignment, |
regtype.pilot |
regression type used for the pilot mean and residual-variance
smooths. The default |
nomad.pilot |
logical value indicating whether the pilot regressions should use the
automatic NOMAD local-polynomial route when compatible with
|
pilot.args |
optional named list of additional arguments supplied to the pilot
|
These arguments control the main check-loss bandwidth and
delta optimization.
regtype |
regression type for the main transformed-response fit and check-loss
bandwidth search. This is independent of |
delta |
optional starting value for the shift parameter. If omitted, the
first start uses |
delta.bounds |
two numeric values giving the lower and upper bounds for
|
nomad |
logical value or the character string |
nomad.opts |
optional named list of native NOMAD parameters forwarded to the
crs NOMAD C API for NOMAD-backed bandwidth searches.
|
bandwidth.compute |
logical value indicating whether automatic bandwidth selection should
be performed. Defaults to |
optim.control |
a list of controls passed to the Powell optimizer used for fixed degree searches and NOMAD hot-start refinement. |
... |
additional bandwidth, kernel, local-polynomial, and search controls
forwarded to the package bandwidth machinery. Common examples include
|
Regression searches and pilot fits inherit numerical ridging from
npregbw and npreg.
For a requested quantile probability \tau,
nplsqregbw chooses bandwidths and delta for the
transformed response
Y_i^\delta = Y_i + \hat\sigma(X_i)\Phi^{-1}(\delta)
by minimizing the leave-one-out check loss. The selected bandwidths
are then used by nplsqreg for the final mixed-data
npreg fit of the transformed response.
When the response fitted inside a leave-one-out fold differs from the response entering the requested check loss, the deleted fitted value is reconstructed with the fitted response while the residual is formed with the requested loss response. Invalid search guidance is the exact constrained constant-quantile check-loss null. A final NOMAD or Powell payload is accepted only when replay of its selected point returns a raw finite objective.
The default pilot scale is a residual scale: first npreg
estimates the conditional mean, then npreg smooths
squared residuals using the same bandwidth object, and the square root
of the floored fitted variance is used as the scale. The local-linear
pilot option follows Fan and Yao (1998). A user-supplied scale
must be strictly positive and is interpreted as a conditional standard
deviation, not a variance.
When nomad=TRUE, the search can include the continuous
local-polynomial degree vector in addition to bandwidths and
delta. The search.engine="nomad+powell" route uses NOMAD
for degree search and Powell for hot-start refinement at the selected
degree. When nomad="auto", a one-dimensional smoothing problem
instead evaluates the complete requested degree lattice and jointly
optimizes bandwidth and delta at every degree; higher-dimensional
problems use the NOMAD/Powell policy. nomad.pilot remains an
independent logical control and is not enabled by primary AUTO.
nplsqregbw returns an object of class
lsqregressionbandwidth. For vector tau, the object stores
the per-tau bandwidth objects, selected delta values,
objectives, fit order, warm-start provenance, and shared pilot scale.
Tristen Hayfield tristen.hayfield@gmail.com, Jeffrey S. Racine racinej@mcmaster.ca
Fan, J. and Q. Yao (1998), “Efficient Estimation of Conditional Variance Functions in Stochastic Regression,” Biometrika, 85, 645-660. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biomet/85.3.645")}
Racine, J.S. and K. Li (2017), “Nonparametric conditional quantile estimation: A locally weighted quantile kernel approach,” Journal of Econometrics, 201, 72-94. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jeconom.2017.06.020")}
Racine, J.S. and I. Van Keilegom (2020), “A smooth nonparametric, multivariate, mixed-data location-scale test,” Journal of Business & Economic Statistics, 38, 784-795. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/07350015.2019.1574227")}
nplsqreg, npregbw, npreg,
np.kernels, np.options
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.