# When and why would you not want to use a GAM?

I understand that GAMs in mgcv have the ability to reduce s(x) to a linear relationship with the response variable. If this is the case, why wouldn't you use a GAM?

When fitting smooth terms in gam() using s(x) my understanding is that if the relationship between x and the response variable is linear then a linear relationship will be fitted. Similarly, if the relationship between x and the response variable is non-linear then an appropriate non-linear relationship will be fitted. This is demonstrated when looking at summary(my_gam) - if s(x) has a linear relationship with the response variable the effective degrees of freedom (edf) in summary(my_gam) is 1 or approximately 1, indicating a linear relationship.

Threfore, I don't understand why you wouldn't use a GAM if it can model linear relationships should they exist, but also model non-linear relationships should these exist.In other words, why use a GLM over a GAM if you must make additional assumptions about relationships between the response and predictor - assumptions that do not need to be made when using a GAM?

Its seems that a GAM can do everything that a GLM can and more, but it doesn't do the 'and more' bit (i.e fit non-linear relationships) unless it is needed.

• Why wouldn't you? – Tim Nov 12 '19 at 6:32
• possibly duplicate? stats.stackexchange.com/questions/380426/… – rep_ho Nov 13 '19 at 17:51
• Thanks rep_ho. I saw this question you suggest. Perhaps I should rephrase my question again - When and why would you not want to a GAM? It would seem to me that GAMs and GLMs can essentially be used to model similar relationships between a response and predictor, the main difference being that whilst GAMs can model linear relationships, there is no underlying assumption of linearity in a GAM. Why force yourself to make this assumption by using a GLM when it is not necessary when using a GAM? – Pat Taggart Nov 13 '19 at 21:57

You could take this to extreme and ask why wouldn't we use non-parametric model like $$k$$-NN regression? Actually, the opposite question Why would anyone use KNN for regression? was asked, and you can check it for more detailed discussion. You can also make the question more broad and ask why wouldn't we use more complicated models instead of simpler ones? For example, why would anyone use logistic, or linear regression, if they could use a neural network?