Skip to contents

Returns the function that computes the statistics of a model for add_glance_table() and add_glance_source_note(): a base-R function with the columns of broom::glance() for lm, glm and coxph models, and broom::glance() itself for other classes (broom must then be installed). To report other statistics, pass a function to the glance_fun argument of those functions instead.

Usage

glance_fun_s3(x, ...)

Arguments

x

(regression model)
A fitted model.

...

Not used.

Value

A function that takes a model and returns a one-row data frame.

Examples

glance_fun_s3(lm(age ~ marker, trial))(lm(age ~ marker, trial))
#>      r.squared adj.r.squared    sigma  statistic  p.value df    logLik     AIC
#> 1 0.0002208025  -0.005427668 11.60587 0.03909068 0.843496  1 -691.8048 1389.61
#>        BIC deviance df.residual nobs
#> 1 1399.172 23841.22         177  179