vibe.gam | R Documentation |
gam
objectvibe.gam
takes a fitted mgcv::gam()
object and calculates
variable importance metrics by fitting the submodels required, extracting the
desired goodness-of-fit metric and applying variable importance metrics to
it.
## S3 method for class 'gam'
vibe(object, varimp = "hp", gof = "R2e", ncores = 1, progress = TRUE, ...)
object |
A |
varimp |
One of |
gof |
Goodness-of-fit metric, the changes of which shall be analysed |
ncores |
Number of cores used for the model fitting process, happening
in |
progress |
Boolean. Do you want to see a progress bar? |
... |
Other arguments |
library("mgcv")
gam_ocat <- gam(
satisfaction ~ admin + hygiene + time_appointment +
quality_dr + diagnosis_exactness + equipment_modern +
friendly_workers + parking_playingrooms_cafes,
data = vibe::sat, family = ocat(R = 3)
)
hp_gam <- vibe(gam_ocat, varimp = "hp", gof = "R2e", progress = FALSE)
rw_gam <- vibe(gam_ocat, varimp = "relweights", gof = "R2e")
print(hp_gam)
print(rw_gam)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.