Prepare the locations of knots for use in Gaussian Predictive Process (GPP) models within the HMSC framework. It ensures that knots are spaced at a minimum specified distance and applies jitter to any identical coordinates to avoid overlap.
Usage
Mod_PrepKnots(
Coords = NULL,
MinDist = NULL,
JitterDist = 100,
MinLF = NULL,
MaxLF = NULL,
Alphapw = list(Prior = NULL, Min = 20, Max = 1200, Samples = 200)
)Arguments
- Coords
Numeric matrix or data frame containing the (x, y) coordinates of sampling units.
- MinDist
Numeric. Minimum distance between knots in meters. This distance is used for both
knotDistandminKnotDistparameters of the Hmsc::constructKnots function.- JitterDist
Numeric. The jitter distance applied to overlapping coordinates to avoid exact duplicates. Defaults to 100 meters.
- MinLF, MaxLF
Integer. Minimum and maximum number of latent factors to be used. Both default to
NULLwhich means that the number of latent factors will be estimated from the data. If either is provided, the respective values will be used as arguments to Hmsc::setPriors.- Alphapw
Prior for the alpha parameter. Defaults to a list with
Prior = NULL,Min = 20,Max = 1200, andSamples = 200. IfAlphapwisNULLor a list with allNULLlist items, the default prior will be used. IfPrioris a matrix, it will be used as the prior. IfPrior = NULL, the prior will be generated usingMin,Max, andSamples.MinandMaxare the minimum and maximum values of the alpha parameter (in kilometer).Samplesis the number of samples to be used in the prior.