getRadiiChoices | R Documentation |
getRadiiChoices()
has been superseded in favour of getRadiiSequence()
getRadiiChoices(numberofradii = 10, distMatrix, basis, rvin = NULL)
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 |
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. |
The range parameter determines the range of the influence of each knot. Small numbers indicate local influence and large ones, global influence.
This function returns a vector containing a sequence of range parameters.
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
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.