rb: Creates a model using penalized smoothing splines

View source: R/psplines.R

rbR Documentation

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.

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.

Value

A list giving all the required information to fit a penalized smoothing spline:

dsgn.mat

The design matrix.

pen.mat

The penalization matrix.

degree

The degree of the smoothing spline.

penalty

The penalty of the smoothing spline.

knots

The knots of the smoothing spline.

data

The explicative variables (e.g. covariates).

call

How 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.

Author(s)

Mathieu Ribatet

See Also

fitmaxstab

Examples

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)

SpatialExtremes documentation built on April 19, 2022, 5:06 p.m.