Skip to contents

nplsqregbw selects bandwidths and the scalar location-scale shift parameter delta for nplsqreg by minimizing leave-one-out check loss.

Usage

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())

Arguments

Data, Bandwidth Inputs And Formula Interface

These arguments identify the bandwidth specification, formula/data interface, and training data.

bws

a formula, an lsqregressionbandwidth object, an rbandwidth object, a numeric bandwidth vector, or omitted for automatic selection. Ordinary npregbw rbandwidth objects may be used as starting values. Exact nplsqreg reuse is through an lsqregressionbandwidth object, typically fit$bws; fit$reg.bws is internal regression state.

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 with(data, ...). Supplying data, including explicit data = NULL, to a native route that does not consume it is an error; see np-data-interfaces.

an optional data frame, list or environment containing the variables in the model. If not found in data, the variables are taken from environment(bws).

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 \(p\)-variate data frame of explanatory data used as training data.

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\). Values must lie strictly in \((0,1)\).

either "full" or "refined". The default "full" route performs a full bandwidth/delta search for each tau, sharing only the pilot scale. The explicit "refined" route fits the central tau first and uses the resulting bandwidths, delta, and when applicable selected degree vector as warm starts for the remaining quantiles.

Scale Pilot

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, subset and missing-value selection. A vector already having the selected sample length remains accepted when that length differs from the original sample length.

regtype.pilot

regression type used for the pilot mean and residual-variance smooths. The default "auto" uses local linear smoothing when continuous predictors are present and local constant smoothing for categorical-only designs.

nomad.pilot

logical value indicating whether the pilot regressions should use the automatic NOMAD local-polynomial route when compatible with regtype.pilot. Defaults to FALSE.

pilot.args

optional named list of additional arguments supplied to the pilot npreg calls.

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 regtype.pilot and follows npregbw semantics.

delta

optional starting value for the shift parameter. If omitted, the first start uses 0.5; subsequent multistarts draw starting values from \((0,1)\).

delta.bounds

two numeric values giving the lower and upper bounds for delta. The interval must lie strictly inside \((0,1)\).

nomad

logical value or the character string "auto". TRUE uses the local-polynomial NOMAD route for joint bandwidth, delta, and continuous degree-vector search. "auto" uses exhaustive/cell degree search for one continuous smoothing dimension and NOMAD/Powell for two or more. Defaults to FALSE.

nomad.opts

optional named list of native NOMAD parameters forwarded to the crs NOMAD C API for NOMAD-backed bandwidth searches. NULL is treated as no extra NOMAD options. Non-list values and invalid or unsupported parameters are rejected before solver entry.

bandwidth.compute

logical value indicating whether automatic bandwidth selection should be performed. Defaults to TRUE.

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 regtype, bwtype, bwmethod, nmulti, degree, basis, bernstein.basis, search.engine, degree.min, degree.max, degree.start, degree.restarts, powell.remin, nomad.remin, and nomad.nmulti. The explanatory-variable kernel aliases used by npqreg and npcdistbw, such as cxkertype, cxkerorder, uxkertype, and oxkertype, are accepted and mapped to the corresponding regression-kernel controls. Response-side conditional-distribution kernel controls such as cykertype are not meaningful for the location-scale transformed-response estimator and fail clearly rather than being ignored.

Details

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.

Value

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.

References

Fan, J. and Q. Yao (1998), “Efficient Estimation of Conditional Variance Functions in Stochastic Regression,” Biometrika, 85, 645-660. 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. 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. doi:10.1080/07350015.2019.1574227

Author

Tristen Hayfield tristen.hayfield@gmail.com, Jeffrey S. Racine racinej@mcmaster.ca