Description Usage Arguments Details Value
lagr.tune
estimates the bandwidth parameter for a LAGR model.
1 2 3 4 5 6 7 8 | lagr.tune(formula, data, family = gaussian(), range = NULL,
weights = NULL, coords, oracle = NULL, kernel = NULL,
bw.type = c("dist", "knn", "nen"), varselect.method = c("AIC", "BIC",
"AICc", "jacknife", "wAIC", "wAICc"), verbose = FALSE, longlat = FALSE,
tol.loc = .Machine$double.eps^0.25, tol.bw = .Machine$double.eps^0.25,
bwselect.method = c("AIC", "AICc", "GCV", "BIC"),
lambda.min.ratio = 0.001, n.lambda = 50, lagr.convergence.tol = 0.001,
lagr.max.iter = 20, na.action = na.fail, contrasts = NULL)
|
formula |
symbolic representation of the model |
data |
data frame containing observations of all the terms represented in the formula |
family |
exponential family distribution of the response |
range |
allowable range of the bandwidth |
weights |
vector of prior observation weights (due to, e.g., overdispersion). Not related to the kernel weights. |
coords |
matrix of locations, with each row giving the location at which the corresponding row of data was observed |
kernel |
kernel function for generating the local observation weights |
bw.type |
type of bandwidth - options are |
varselect.method |
criterion to minimize in the regularization step of fitting local models - options are |
verbose |
print detailed information about our progress? |
longlat |
|
tol.loc |
local error tolerance for converting an adaptive bandwidth (e.g. |
tol.bw |
global error tolerance for minimizing the bandwidth selection criterion |
bwselect.method |
criterion to minimize when tuning bandwidth - options are |
fit.loc |
matrix of locations where the local models should be fitted |
bw |
bandwidth for the kernel |
tuning |
logical indicating whether this model will be used to tune the bandwidth, in which case only the tuning criteria are returned |
a |
pre-specified matrix of distances between locations |
This method calls lagr
repeatedly via the optimize
function, searching for the bandwidth that minimizes a bandwidth selection criterion. It returns the profiled value of the selection criterion at each bandwidth that is used in the evaluation.
list(bw, trace)
where bw
minimizes the bandwidth selection criterion and trace is a data frame of each bandwidth that was tried during the optimization, along with the resulting degrees of freedom used inthe LAGR model and the value of the bandwidth selection criterion.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.