powered by
This function computes the fitted values, given the amount of the penalty (if applicable) and the locations of the knots.
# S3 method for freekt fitted(object, xfit = object@x, …)
An object of class "freekt" obtained by using one of the fitting algorithms.
freekt
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.
A vector containing the fitted values.
residuals.freekt for the residuals.
residuals.freekt
# NOT RUN { 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.freekt(xy.freekt) # }
Run the code above in your browser using DataLab