rb {SpatialExtremes} | R 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 |
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
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)