Those functions are simpler and designed for a pair of x
and y
variables. Suitable alternatives exist, such as in the forms of two functions named gam()
, one in package mgcv which comes with R as a Recommended package, and the other in package gam which is an R version of the GAM software (gam()
) in S-PLUS and the original implementation following Hastie & Tibshirani's "mono"graph on Generalised Additive Models (GAM).
Both fit so called additive models where the main assumption is that the terms in the model contribute in additively to the give the fitted response. If you want LOESS-based smooths in the GAM, try package gam, but mgcv has a wider range of penalised regression splines and has a more modern approach to smoothness selection in the individual splines.