gam_model_rank {stgam} | R Documentation |
Ranks models by GCV, giving the model form for each predictor variable.
Description
Ranks models by GCV, giving the model form for each predictor variable.
Usage
gam_model_rank(res_tab, n = 10)
Arguments
res_tab |
a |
n |
the number of ranked models to return. |
Value
a tibble
of the 'n' best models, ranked by GCV, with the form of each predictor variable where '—' indicates the absence of a predictor, 'Fixed' that a parametric form was specified, 's_S' a spatial smooth, 's_T' a temporal smooth and 't2_ST' a spatio-temporal smooth.
Examples
require(dplyr)
require(doParallel)
# define input data
data("hp_data")
input_data <-
hp_data |>
# create Intercept as an addressable term
mutate(Intercept = 1)
# evaluate different model forms
svc_mods <-
evaluate_models(
input_data = input_data,
target_var = "priceper",
vars = c("pef"),
coords_x = "X",
coords_y = "Y",
VC_type = "SVC",
time_var = NULL,
ncores = 2
)
gam_model_rank(svc_mods)
[Package stgam version 1.0.2 Index]