Consider a model \(Y_i = f(X_i) + \epsilon\).
The
shiny appdemonstrates fitting such a model using linear models (called scatterplot smoothing)The model adds extra terms as below, \[ Y_i = \beta_0 + \beta_1 X_i + \sum_{k=1}^d (x_i - \xi_k)_+ \gamma_k + \epsilon_{i} \] where \((a)_+ = a\) if \(a > 0\) and \(0\) otherwise and \(\xi_1 \leq ... \leq \xi_d\) are known knot points.
Application allows the user to add & adjust 2 knot points and demonstrates how the \(R^2\) improves & \(\sigma\) is reduced.