require(dplyr)
require(stringr)
require(purrr)
require(doParallel)
require(sf)
# define input data
data("chaco")
input_data <-
chaco |>
# create Intercept as an addressable term
mutate(Intercept = 1) |>
# remove the geometry
st_drop_geometry()
# evaluate different model forms
# example 1 with 6 models and no `k` adjustment
svc_mods <-
evaluate_models(
input_data = input_data,
target_var = "ndvi",
vars = c("tmax"),
coords_x = "X",
coords_y = "Y",
VC_type = "SVC"
)
# rank the models
gam_model_rank(svc_mods)
Run the code above in your browser using DataLab