Learn R Programming

SpatialExtremes (version 1.1-1)

rb: Creates a model using penalized smoothing splines

Description

Creates a model using penalized smoothing splines using radial basis functions

Usage

rb(..., knots, degree, penalty)

Arguments

...
The explicative variables for which the spline is based on.
knots
The coordinates of knots. See section details.
degree
Numeric. The degree of the spline.
penalty
Numeric. The penalty coefficient.

Value

  • A list giving all the required information to fit a penalized smoothing spline:
  • dsgn.matThe design matrix.
  • pen.matThe penalization matrix.
  • degreeThe degree of the smoothing spline.
  • penaltyThe penalty of the smoothing spline.
  • knotsThe knots of the smoothing spline.
  • dataThe explicative variables (e.g. covariates).
  • callHow was the rb function was called?

Warning

This function is not supposed to be called directly. rb is supposed to be embedded in a R formula.

Details

If one explicative variable is given in "...", the knots should be a numeric vector. Otherwise, knots should be a matrix with the same number of column and covariates.

See Also

fitmaxstab

Examples

Run this code
n.site <- 30
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")
knots <- quantile(locations[,2], 1:5/6)

form <- y ~ rb(lat, knots = knots, degree = 3, penalty = .5)

Run the code above in your browser using DataLab