lagr.ssr: Calculate the sum of squared residuals for a local model

Description Usage Arguments

View source: R/lagr.ssr.R

Description

This function fits a local LAGR model at loc, and returns its sum of squared residuals (SSR) as a proportion of the SSR from a global model. This proportion is how the bandwidth is specified under nen.

Usage

1
2
3
lagr.ssr(bw, x, y, group.id, family, loc, coords, dist, kernel, target,
  varselect.method, prior.weights, oracle, verbose, lambda.min.ratio, n.lambda,
  lagr.convergence.tol, lagr.max.iter)

Arguments

bw

kernel bandwidth (distance) to use for fitting the local model

x

matrix of observed covariates

y

vector of observed responses

family

exponential family distribution of the response

loc

location around which to center the kernel

coords

matrix of locations, with each row giving the location at which the corresponding row of data was observed

dist

vector of distances from central location to the observation locations

kernel

kernel function for generating the local observation weights

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.

bw

bandwidth parameter

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)

tol.loc

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

tuning

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

D

pre-specified matrix of distances between locations


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