loading...

Create a rich-formatted table from an summary.lm object

# S3 method for class 'summary.lm'
tabularise_default(data, ..., footer = TRUE)

Arguments

data

A summary.lm object

...

Additional arguments passed to tabularise_coef.summary.lm()

If TRUE (by default), add a footer to the table.

Value

A flextable object you can print in different formats (HTML, LaTeX, Word, PowerPoint) or rearrange with the {flextable} functions.

Examples

iris_lm <- lm(data = iris, Petal.Length ~ Sepal.Length)
iris_lm_sum <- summary(iris_lm)
tabularise::tabularise(iris_lm_sum)

Linear model

Petal.Length=α+β(Sepal.Length)+ϵ\operatorname{Petal.Length} = \alpha + \beta_{}(\operatorname{Sepal.Length}) + \epsilon

Term

Estimate

Standard Error

t value

p value

α\alpha

-7.10

0.5067

-14.0

< 2·10-16

***

β\beta_{}

1.86

0.0859

21.6

< 2·10-16

***

0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05

Residuals range: [-2.477, 2.495]
Residuals standard error: 0.8678 on 148 degrees of freedom
Multiple R2: 0.76 - adjusted R2: 0.7583
F-statistic: 468.6 on 1 and 148 df - p value: < 2.22e-16