View source: R/create_APCsummary.R
create_APCsummary | R Documentation |
Create a table to summarize the overall effect strengths of the age, period
and cohort effects for models fitted with gam
or
bam
. The output format can be adjusted by passing
arguments to kable
via the ...
argument.
create_APCsummary(model_list, dat, digits = 2, apc_range = NULL, ...)
model_list |
A list of regression models estimated with
|
dat |
Dataset with columns |
digits |
Number of digits for numeric columns. Defaults to 2. |
apc_range |
Optional list with one or multiple elements with names
|
... |
Optional additional arguments passed to |
If the model was estimated with a log or logit link, the function automatically performs an exponential transformation of the effect.
Table created with kable
.
Alexander Bauer alexander.bauer@stat.uni-muenchen.de
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.