getRadiiChoices: Function for obtaining a sequence of range parameters for the...

View source: R/functions.R

getRadiiChoicesR Documentation

Function for obtaining a sequence of range parameters for the CReSS smoother

Description

[Superseded] getRadiiChoices() has been superseded in favour of getRadiiSequence()

Usage

getRadiiChoices(numberofradii = 10, distMatrix, basis, rvin = NULL)

Arguments

numberofradii

The number of range parameters for SALSA to use when fitting the CReSS smooth. The default is 8. Remember, the more parameters the longer SALSA will take to find a suitable one for each knot location.

distMatrix

Matrix of distances between data locations and knot locations (n x k). May be Euclidean or geodesic distances. Euclidean distances created using makeDists.

basis

character stating whether a 'gaussian' or 'exponential' basis is being used.

rvin

Two parameter vector stating the minimum and maximum range of r for a gaussian basis.

Details

The range parameter determines the range of the influence of each knot. Small numbers indicate local influence and large ones, global influence.

Value

This function returns a vector containing a sequence of range parameters.

References

Scott-Hayward, L.; M. Mackenzie, C.Donovan, C.Walker and E.Ashe. Complex Region Spatial Smoother (CReSS). Journal of computational and Graphical Statistics. 2013. DOI: 10.1080/10618600.2012.762920

Examples


# load data
data(ns.data.re)
# load knot grid data
data(knotgrid.ns)

# make distance matrices for datatoknots and knottoknots
distMats<-makeDists(cbind(ns.data.re$x.pos, ns.data.re$y.pos), na.omit(knotgrid.ns))

# choose sequence of radii
r_seq<-getRadiiChoices(8, distMats$dataDist, basis="gaussian")


lindesaysh/MRSea documentation built on May 11, 2024, 11:30 p.m.