create_modelSummary {APCtools}R Documentation

Create model summary tables for multiple estimated GAM models

Description

Create publication-ready summary tables of all linear and nonlinear effects for models fitted with gam or bam. The output format of the tables can be adjusted by passing arguments to kable via the ... argument.

Usage

create_modelSummary(
  model_list,
  digits = 2,
  method_expTransform = "simple",
  ...
)

Arguments

model_list

list of APC models

digits

number of displayed digits

method_expTransform

One of c("simple","delta"), stating if standard errors and confidence interval limits should be transformed by a simple exp transformation or using the delta method. The delta method can be unstable in situations and lead to negative confidence interval limits. Only used when the model was estimated with a log or logit link.

...

additional arguments to kable

Details

If the model was estimated with a log or logit link, the function automatically performs an exponential transformation of the effects.

The table for linear coefficients includes the estimated coefficient (coef), the corresponding standard error (se), lower and upper limits of 95% confidence intervals (CI_lower, CI_upper) and the p-values for all coefficients apart from the intercept.

The table for nonlinear coefficients include the estimated degrees of freedom (edf) and the p-value for each estimate.

Value

List of tables created with kable.

Author(s)

Alexander Bauer alexander.bauer@stat.uni-muenchen.de

Examples

library(APCtools)
library(mgcv)

data(travel)
model <- gam(mainTrip_distance ~ te(age, period) + residence_region +
             household_size + s(household_income), data = travel)

create_modelSummary(list(model), dat = travel)


[Package APCtools version 1.0.4 Index]