Export glm and manova results from R in a publishable table
1
0
Entering edit mode
15 months ago
LaFra ▴ 10

Hi all,

I would like to export the summary table of a "glm" model constructed with R and also of a MANOVA. Do you know any function that does this?

Thank you!

glm export statistics manova results • 1.4k views
ADD COMMENT
0
Entering edit mode
15 months ago
bkleiboeker ▴ 370

I'd probably just write summary(lm) to a new variable name, call whichever parts of the summary I want and either write them to a .csv (and make tables in PPT) or assign them to a gt table using library(gt).

library(gt)

l <- lm(results ~ condition, data = df)
s <- summary(l)

#write to a csv and make table in PowerPoint or Excel
s$coefficients |> write.csv('coefficient_table.csv')

#or make a gt table
gt_tbl <- gt(s$coefficients) |>
     tab_header(
          title = "LM results",
          subtitle = s$call
     )
ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2330 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6