Local Regression, Likelihood and Density Estimation.
locfit
is the model formula-based interface to the Locfit
library for fitting local regression and likelihood models.
locfit
is implemented as a front-end to locfit.raw
.
See that function for options to control smoothing parameters,
fitting family and other aspects of the fit.
locfit(formula, data=sys.frame(sys.parent()), weights=1, cens=0, base=0, subset, geth=FALSE, ..., lfproc=locfit.raw)
formula |
Model Formula; e.g. |
data |
Data Frame. |
weights |
Prior weights (or sample sizes) for individual observations. This is typically used where observations have unequal variance. |
cens |
Censoring indicator. |
base |
Baseline for local fitting. For local regression models, specifying
a |
subset |
Subset observations in the data frame. |
geth |
Don't use. |
... |
Other arguments to |
lfproc |
A processing function to compute the local fit. Default is
|
An object with class "locfit"
. A standard set of methods for printing,
ploting, etc. these objects is provided.
Loader, C. (1999). Local Regression and Likelihood. Springer, New York.
# fit and plot a univariate local regression data(ethanol, package="locfit") fit <- locfit(NOx ~ E, data=ethanol) plot(fit, get.data=TRUE) # a bivariate local regression with smaller smoothing parameter fit <- locfit(NOx~lp(E,C,nn=0.5,scale=0), data=ethanol) plot(fit) # density estimation data(geyser, package="locfit") fit <- locfit( ~ lp(geyser, nn=0.1, h=0.8)) plot(fit,get.data=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.