frfast(formula, data = data, model = "np", h0 = -1, h = -1, nh = 30,
weights = NULL, kernel = "epanech", p = 3, kbin = 100, nboot = 500,
rankl = NULL, ranku = NULL, seed = NULL)formula: a sympbolic
description of the model to be fitted. The details of model
specification are given under 'Details'.formula.model = "np" nonparametric
regression model with local polynomial kernel smoothers,
model = "allo" the allometric model.h is discretised, to speed up computation.kernel = "epanech", where the Epanechnikov
density function kernel will be used. Also, several types of kernel functons
can be used: triangular and Gaussian density function,
wmodel = "np" and the simple bootstrap
when model = "allo".x value which maximizes the
estimate, first or second derivative (for each level). The default
is the minimum data value.x value which maximizes the
estimate, first or second derivative (for each level). The default
is the maximum data value.x which maximizes the estimate,
first or second derivative.max.max.max for a
couple of levels (i. e. level 2 - level 1). The same procedure for their
first and second derivative.diffmax.diffmax.x value which maximizes the estimate, first or second derivative
(for each level). The default is the maximum data value.x value which maximizes the estimate, first or second derivative
(for each level). The default is the minimum data value.nmodel = 1 the nonparametric model,
nmodel = 2 the allometric model.a.a.b.b.h is discretised.frfast function are specified
in a compact symbolic form. The ~ operator is basic in the formation
of such models. An expression of the form y ~ model is interpreted as
a specification that the response y is modelled by a predictor
specified symbolically by model. The possible terms consist of a
variable name or a variable name and a factor name separated by : operator.
Such a term is interpreted as the interaction of the continuous variable and
the factor.library(npregfast)
data(barnacle)
# Nonparametric regression without interactions
fit <- frfast(DW ~ RC, data = barnacle, nboot = 100)
fit
summary(fit)
# Change the number of binning nodes and bootstrap replicates
fit <- frfast(DW ~ RC, data = barnacle, kbin = 200, nboot = 100)
# Nonparametric regression with interactions
fit2 <- frfast(DW ~ RC : F, data = barnacle, nboot = 100)
fit2
summary(fit2)
# Allometric model
fit3 <- frfast(DW ~ RC, data = barnacle, model = "allo", nboot = 100)
summary(fit3)
# fit4 <- frfast(DW ~ RC : F, data = barnacle, model = "allo", nboot = 100)
# summary(fit4)Run the code above in your browser using DataLab