library(APCtools)
library(mgcv)
data(travel)
# create the summary table for one model
model_pure <- gam(mainTrip_distance ~ te(age, period), data = travel)
create_APCsummary(model_pure, dat = travel)
# create the summary table for multiple models
model_cov <- gam(mainTrip_distance ~ te(age, period) + s(household_income),
data = travel)
model_list <- list("pure model" = model_pure,
"covariate model" = model_cov)
create_APCsummary(model_list, dat = travel)
Run the code above in your browser using DataLab