locfit.raw
is an interface to Locfit using numeric vectors
(for a model-formula based interface, use locfit
).
Although this function has a large number of arguments, most users
are likely to need only a small subset. The first set of arguments (x
, y
, weights
,
cens
, and base
) specify the regression
variables and associated quantities.
Another set (scale
, alpha
, deg
, kern
,
kt
, acri
and basis
) control the amount of smoothing:
bandwidth, smoothing weights and the local model. Most of these arguments
are deprecated - they'll currently still work, but should be provided through
the lp()
model term instead.
deriv
and dc
relate to derivative (or local slope)
estimation.
family
and link
specify the likelihood family.
xlim
and renorm
may be used in density estimation.
ev
specifies the evaluation structure or set of evaluation points.
maxk
, itype
, mint
, maxit
and debug
control the Locfit algorithms, and will be rarely used.
geth
and sty
are used by other functions calling
locfit.raw
, and should not be used directly.
locfit.raw(x, y, weights=1, cens=0, base=0,
scale=FALSE, alpha=0.7, deg=2, kern="tricube", kt="sph",
acri="none", basis=list(NULL),
deriv=numeric(0), dc=FALSE,
family, link="default",
xlim, renorm=FALSE,
ev=rbox(),
maxk=100, itype="default", mint=20, maxit=20, debug=0,
geth=FALSE, sty="none")
lp()
function.y
can be omitted.1
(or TRUE
) for a censored observation, and
0
(or FALSE
) for uncensored observations.bas
lp()
.lp()
.
A single number (e.g. alpha=0.7
)
is interpreted as a nearest neighbor fraction. With two
componentes (e.g. alpha=c(0.7,1.2)
), the first component
is a nearest neilp()
."tcub"
.
Other choices are "rect"
, "trwt"
, "tria"
,
"epan"
, "bisq"
and "gauss"
. Choices may be restricted
when derivatives are requir"sph"
(default); "prod"
.
In multivariate problems, "prod"
uses a
simplified product model which speeds up computations.lp().
lfbas
for more details on this argument.deriv=1
, the returned fit will be
estimating the derivative (or more correctly, an estimate of the
local slope). If deriv=c(1,1)
the second order derivative
is estimated. deriv=2
is fo"gaussian"
;
"binomial"
; "poisson"
; "gamma"
and "geom"
.
Density and rate estimation families are "dens"
, "rate"
and
"hazard"
"ident"
, "log"
, "logit"
,
"inverse"
, "sqrt"
and "arcsin"
.c(ll,ul)
where ll
is a vector of
the lower bounds and ur
renorm=T
, the integral will be estimated
numerically and the estimate rescaled. Presently this is implemented
only in one dimension."prod"
, "mult"
and "mlin"
; and "haz"
for
hazard rate estimation problems. The available integration methods
depend on model speciflp()
.