# Generalized additive models - formula for basis functions

I'm trying to understand the basics of GAMs. Wood's book "Generalized Additive Models: an introduction with R" introduces GAMs via a cubic spline basis $b_j(x)$ (see p. 122), where $b_1(x)=1, b_2(x)=x$ and $b_{i+2}(x)=R(x, x_i^*)$ ($1 \leq i \leq q-2$, $x_i^*$ are knot locations), where $R(x,z)=\left[ (z-1/2)^2 -1/12 \right]\left[ (x-1/2)^2 -1/12 \right]/4 - \left[(|x-z|-1/2)^4 - 1/2 (|x-z|-1/2)^2 +7/240 \right]/24.$

But there's definitely an error in the last expression since it's a spline of order 4. How should the correct formula look like?

Could anyone suggest another simple but mathematically rigorous (and relatively comprehensive) introduction to GAMs?

GAM in "Introduction to statistical learning" (page 283) is defined as extension to multiple regression. Lets begin with a term representing simple multiple regression: $$\hat{y} = \beta_{0} + \beta_{1}x_{1} + ... +\beta_{n}x_{n} +\epsilon_i$$. Now instead of just multiplying each variable $$x_{1},x_{2},...,x_{n}$$ with coefficients $$\beta_{1}, \beta_{2},...,\beta_{n}$$, you could use some functions $$f_{1},...,f_{n}$$ to model the relationship between predictors and response variable: $$\hat{y} = f_{1}(x_{1}) + ... + f_{n}(x_{n}) +\epsilon_i$$. By doing this, you are adding possibility to model each predictor's contribution to the response variable with non-linear functions. This is the idea of GAMs.