aspline {aspline}R Documentation

Fit B-splines with automatic knot selection.

Description

Fit B-splines with automatic knot selection.

Usage

aspline(
  x,
  y,
  knots = seq(min(x), max(x), length = 42)[-c(1, 42)],
  pen = 10^seq(-3, 3, length = 100),
  degree = 3L,
  family = c("gaussian", "binomial", "poisson"),
  maxiter = 1000,
  epsilon = 1e-05,
  verbose = FALSE,
  tol = 1e-06
)

aridge_solver(
  x,
  y,
  knots = seq(min(x), max(x), length = 42)[-c(1, 42)],
  pen = 10^seq(-3, 3, length = 100),
  degree = 3L,
  family = c("gaussian", "binomial", "poisson"),
  maxiter = 1000,
  epsilon = 1e-05,
  verbose = FALSE,
  tol = 1e-06
)

Arguments

x, y

Input data, numeric vectors of same length

knots

Knots

pen

A vector of positive penalty values. The adaptive spline regression is performed for every value of pen

degree

The degree of the splines. Recommended value is 3, which corresponds to natural splines.

family

A description of the error distribution and link function to be used in the model. The "gaussian", "binomial", and "poisson" families are currently implemented, corresponding to the linear regression, logistic regression, and Poisson regression, respectively.

maxiter

Maximum number of iterations in the main loop.

epsilon

Value of the constant in the adaptive ridge procedure (see Frommlet, F., Nuel, G. (2016) An Adaptive Ridge Procedure for L0 Regularization.)

verbose

Whether to print details at each step of the iterative procedure.

tol

The tolerance chosen to diagnostic convergence of the adaptive ridge procedure.

Value

A list with the following elements:

Functions


[Package aspline version 0.2.0 Index]