lf | R Documentation |
This function is used to specify a smooth term in a gam()
model formula.
This function is designed to be used with the S-Plus
gam()
function. For R users, there are at least two different
gam()
functions available. Most current distributions of R
will include the mgcv
library by Simon Wood; lf()
is not compatable with this function.
On CRAN, there is a gam
package by Trevor Hastie, similar to
the S-Plus version. lf()
should be compatable with this, although
it's untested.
lf(..., alpha=0.7, deg=2, scale=1, kern="tcub", ev=rbox(), maxk=100)
... |
numeric predictor variable(s) |
alpha , deg , scale , kern , ev , maxk |
these are as in
|
locfit
,
locfit.raw
,
gam.lf
,
gam
## Not run:
# fit an additive semiparametric model to the ethanol data.
stopifnot(require(gam))
# The `gam' package must be attached _before_ `locfit', otherwise
# the following will not work.
data(ethanol, package = "lattice")
fit <- gam(NOx ~ lf(E) + C, data=ethanol)
op <- par(mfrow=c(2, 1))
plot(fit)
par(op)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.