Function for Generating Basis Functions

make_gam(
  coords,
  method = "cubic2d",
  nd = 20,
  K = NULL,
  nruns = 10,
  num.nn = 20,
  ll.to.utm = TRUE,
  max.loop = 40,
  print.plot = TRUE,
  plot.main = NULL,
  scale.coords = TRUE
)

Arguments

coords

matrix or data frame with easting and northing coordinates, respectively. First column should be easting (e.g., X, long) and second northing.

method

one of c("mgcv", "cubic2d", "strebel")

nd

number of points to use in cover design. See fields::cover.design.

K

max number of basis functions to produce in mgcv::jagam()

nruns

The number of random starts to be optimized.See fields::cover.design.

num.nn

max number of nearest neighbors. See fields::cover.design.

ll.to.utm

logical if TRUE will convert lat long coordinates to UTMs prior to creating distance-based basis functions.

max.loop

Maximum number of passes throguh cover.design algorithm. See fields::cover.design.

print.plot

logical if TRUE will print spatial representation of site and knot locations to local device.

plot.main

optional Character vector for plot title.

scale.coords

logical if TRUE will scale and center the XY coordinates using bbsebird::standardize.