lagr: Fit a model via local, adaptive grouped regularization

Description Usage Arguments Value

View source: R/lagr.r

Description

lagr fits a LAGR model This method fits a local model at each location indicated by fit.loc.

Usage

1
2
3
4
5
6
7
8
lagr(formula, data, family = gaussian(), weights = NULL, coords,
  fit.loc = NULL, tuning = FALSE, predict = FALSE, simulation = FALSE,
  oracle = NULL, kernel = NULL, bw = NULL, varselect.method = c("AIC",
  "BIC", "AICc", "wAIC", "wAICc"), verbose = FALSE, longlat = FALSE,
  tol.loc = NULL, bw.type = c("dist", "knn", "nen"), D = NULL,
  lambda.min.ratio = 0.001, n.lambda = 50, lagr.convergence.tol = 0.001,
  lagr.max.iter = 20, jacknife = FALSE, bootstrap.index = NULL,
  na.action = na.fail, contrasts = NULL)

Arguments

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

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

fit.loc

matrix of locations where the local models should be fitted

tuning

logical indicating whether this model will be used to tune the bandwidth, in which case only the tuning criteria are returned

kernel

kernel function for generating the local observation weights

bw

bandwidth parameter

varselect.method

criterion to minimize in the regularization step of fitting local models - options are AIC, AICc, BIC, GCV

verbose

print detailed information about our progress?

longlat

TRUE indicates that the coordinates are specified in longitude/latitude, FALSE indicates Cartesian coordinates. Default is FALSE.

tol.loc

tolerance for the tuning of an adaptive bandwidth (e.g. knn or nen)

bw.type

type of bandwidth - options are dist for distance (the default), knn for nearest neighbors (bandwidth a proportion of n), and nen for nearest effective neighbors (bandwidth a proportion of the sum of squared residuals from a global model)

D

pre-specified matrix of distances between locations

Value

list containing the local models.


wrbrooks/lagr documentation built on May 4, 2019, 11:59 a.m.