Type: Package
Title: Outrigger Regression
Version: 1.1.0
Maintainer: Elliot H. Young <ey244@cam.ac.uk>
Description: Performs outrigger local polynomial regression/ distributional adaptation, using a score-matching spline estimator of the conditional score function. Details of the method can be found in Young, Shah and Samworth (2026) <doi:10.48550/arXiv.2603.11282>.
License: GPL-3
Encoding: UTF-8
Imports: Rcpp, np, mgcv, RColorBrewer
LinkingTo: Rcpp
Suggests: testthat (≥ 3.0.0)
RoxygenNote: 7.2.3
NeedsCompilation: yes
Packaged: 2026-03-20 11:16:11 UTC; elliotyoung
Author: Elliot H. Young [cre], Rajen D. Shah [aut], Richard J. Samworth [aut]
Repository: CRAN
Date/Publication: 2026-03-24 10:10:15 UTC

Performs outrigger regression at a point x

Description

Performs outrigger regression at a point x

Usage

outrigger(
  formula,
  data,
  xtest,
  degree = 0,
  bandwidth = NULL,
  kernel = "epan",
  lambda = NULL,
  folds = 5,
  scoregranality = 1,
  score_df = 10,
  verbose = TRUE
)

Arguments

formula

formula (as in e.g. lm).

data

data frame.

xtest

datapoint(s) for local estimation.

degree

degree of polynomial.

bandwidth

bandwidth parameter. If NULL a rule-of-thumb bandwidth is selected by least-squares cross-validation for the standard local polynomial estimator.

kernel

kernel for local polyomial. Default is epanechnikov kernel.

lambda

orthogonalisation parameter. By default takes \lambda = 4(1 + 0.5 \log(n)).

folds

number of folds for cross-fitting. Default is 5.

scoregranality

the number of bins to split covariate-space |X-x|\leq\lambda h for conditional score estimation.

score_df

number of degrees of freedom for score matching splines used for conditional score estimation. Input can be a numeric value (e.g. 10 on larger datasets, 6 on smaller datasets) or "cross-validation" or "cross-validation-quick", in which case score-matching-CV will be performed (may be computationally costly).

verbose

suppresses messages of progress. Default is TRUE.

Value

If x is a single point, return a list containing:

prediction

The outrigger local polynomial estimator \hat{f}(x) at x.

fitted_vector

For the local linear outrigger estimator, the full fitted vector at x

standardlocpol_fitted_vector

The fitted vector for the standard local polynomial

score_plot_metadata

Data used for score_plotting to plot the fitted conditional score functions

If x is a vector of points, return a dataset with points x and associated outrigger fitted values.


Plots the fitted score functions learnt in an outrigger fit.

Description

Plots the fitted score functions learnt in an outrigger fit.

Usage

score_plots(fitted_outrig, plot_together = TRUE)

Arguments

fitted_outrig

a fitted object from outrigger

plot_together

a logical denoting whether all score function estimators (across all covariate bins) should be plotted toghether. Default is TRUE.

Value

No return value, called for plotting the estimated score function.

mirror server hosted at Truenetwork, Russian Federation.