R example: spline # Load in the two functions from last example -- ignore printouts source('http://www-stat.stanford.edu/~jtaylo/courses/stats203/R/inference ... I then fit a linear regression model to the data, as well as a separate cubic regression, i.e. Y =β0 +β1X +β2X2 +β3X3 +ε. a. Suppose that the true relationship between X and Y is linear, i.e. Y = β0 + β1X + ε. Consider the training residual sum of squares (RSS) for the linear regression, and also the training RSS for the cubic regression.
5.1: Cubic Splines Interpolating cubic splines need two additional conditions to be uniquely deﬁned Deﬁnition. [11.3] An cubic interpolatory spilne s is called a natural spline if s00(x 0) = s 00(x m) = 0 C. Fuhrer:¨ FMN081-2005 97