lp | R Documentation |
lp
is a local polynomial model term for Locfit models.
Usually, it will be the only term on the RHS of the model formula.
Smoothing parameters should be provided as arguments to lp()
,
rather than to locfit()
.
lp(..., nn, h, adpen, deg, acri, scale, style)
... |
Predictor variables for the local regression model. |
nn |
Nearest neighbor component of the smoothing parameter.
Default value is 0.7, unless either |
h |
The constant component of the smoothing parameter. Default: 0. |
adpen |
Penalty parameter for adaptive fitting. |
deg |
Degree of polynomial to use. |
acri |
Criterion for adaptive bandwidth selection. |
style |
Style for special terms ( |
scale |
A scale to apply to each variable. This is especially important for
multivariate fitting, where variables may be measured in
non-comparable units. It is also used to specify the frequency
for |
locfit
,
locfit.raw
data(ethanol, package="locfit")
# fit with 50% nearest neighbor bandwidth.
fit <- locfit(NOx~lp(E,nn=0.5),data=ethanol)
# bivariate fit.
fit <- locfit(NOx~lp(E,C,scale=TRUE),data=ethanol)
# density estimation
data(geyser, package="locfit")
fit <- locfit.raw(lp(geyser,nn=0.1,h=0.8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.