Skip to content
Prev 33700 / 63424 Next

Formulas in gam function of mgcv package

Dear R-experts,

I have a question on the formulas used in the gam function of the mgcv 
package.

I am trying to understand the relationships between:

y~s(x1)+s(x2)+s(x3)+s(x4)

and 

y~s(x1,x2,x3,x4)

Does the latter contain the former? what about the smoothers of all 
interaction terms? 

I have (tried to) read the manual pages of gam, formula.gam, smooth.terms, 
linear.functional.terms but could not understand properly.

Regards