3

I am trying to create a table of my mgcv::gam() summary with the stargazer package. See code below.

library(stargazer)
library(mgcv)

set.seed(2) ## simulate some data... 
dat <- gamSim(1,n=400,dist="normal",scale=2)
b <- gam(y~(x0)+(x1)+s(x2)+s(x3),data=dat)
summary(b)

stargazer(b, type = "text", summary = T, colnames=T, rownames = T, df=T, digits=3)

The output does not include the information for the fitted smooth splines (or even for each knot). Do you know how to include all of the information included in the summary in this stargazer table?

Shawn Hemelstrand
  • 2,676
  • 4
  • 17
  • 30
ecology
  • 606
  • 3
  • 9
  • 29
  • What exactly do you mean by "the information for the fitted smooth splines (or even for each knot)"? – Roland Aug 02 '19 at 06:16
  • 3
    This looks like a bug (*stargazer* claims to support *mgcv* models estimated via `gam()`). It shouldn't be reporting (be default) coefficient estimates for basis functions (those aren't knots). I suggest you speak with the maintainer. – Gavin Simpson Aug 02 '19 at 19:25

0 Answers0