fitted.freekt: Compute Fitted Values For Free-Knot Spline

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Rfunc.R

Description

This function computes the fitted values, given the amount of the penalty (if applicable) and the locations of the knots.

Usage

1
2
## S3 method for class 'freekt'
fitted(object, xfit = object@x, ...)

Arguments

object

An object of class "freekt" obtained by using one of the fitting algorithms.

xfit

A vector of x values at which to compute the fitted values. Defaults to the x values of the data.

...

Additional arguments to be passed to fitted.freekt. Currently ignored.

Value

A vector containing the fitted values.

Author(s)

Steven Spiriti

See Also

residuals.freekt for the residuals.

Examples

1
2
3
4
5
6
x <- 0:30/30
truey <- x*sin(10*x)
set.seed(10556)
y <- truey + rnorm(31, 0, 0.2)
xy.freekt <- freelsgen(x, y, degree = 2, numknot = 2, 555)
fitted(xy.freekt)


freeknotsplines documentation built on May 19, 2017, 8:18 p.m.
Search within the freeknotsplines package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.