Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mspline

Vector Smoothing Spline


Description

Fit a smoothing spline to a matrix of responses, single x.

Usage

mspline(x, y, w, df = 5, lambda, thresh = 1e-04, ...)

Arguments

x

x variable (numeric vector).

y

response matrix.

w

optional weight vector, defaults to a vector of ones.

df

requested degrees of freedom, as in smooth.spline.

lambda

can provide penalty instead of df.

thresh

convergence threshold for df inversion (to lambda).

...

holdall for other arguments.

Details

This function is based on the ingredients of smooth.spline, and allows for simultaneous smoothing of multiple responses

Value

A list is returned, with a number of components, only some of which are of interest. These are

lambda

The value of lambda used (in case df was supplied)

df

The df used (in case lambda was supplied)

s

A matrix like y of smoothed responses

lev

Self influences (diagonal of smoother matrix)

Author(s)

Trevor Hastie

See Also

Examples

x=rnorm(100)
y=matrix(rnorm(100*10),100,10)
fit=mspline(x,y,df=5)

mda

Mixture and Flexible Discriminant Analysis

v0.5-2
GPL-2
Authors
S original by Trevor Hastie & Robert Tibshirani. Original R port by Friedrich Leisch, Kurt Hornik and Brian D. Ripley. Balasubramanian Narasimhan has contributed to the upgrading of the code.
Initial release
2020-06-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.