lagr.knn: Calculate the proportion of observations that lie within a...

Description Usage Arguments Value

View source: R/lagr.knn.r

Description

Facilitates a knn-type bandwidth by calculating the proportion sum(w) / n. Called repeatedly by optimize in lagr.dispatch to home in on the desired knn.

Usage

1
2
lagr.knn(bw, loc, coords, dist, kernel, target, prior.weights, total.weight,
  verbose)

Arguments

bw

bandwidth for which to compute sum(w)

loc

location around which to center the kernel

coords

matrix of observation locations

dist

vector of distances from central location to the observation locations

kernel

kernel function for generating the local observation weights

target

targeted knn bandwidth

prior.weights

vector of prior observation weights provided by the user

total.weight

sum of prior weights

verbose

print detailed information about our progress?

Value

difference between the calculated sum(w) / total.weight and the target


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