shape "rbind" and shape = term + response ~ statistic at the same time
Closed this issue · 4 comments
Hi,
I would like some help.
I would like to know if it is somehow possible to use shape="rbind" and at the same time have the model stats on the wide format, such as while using shape = term + response ~ statistic at the same time.
Thanks
No. But you can create two tables and use rbind(tab1, tab2)
ooh I see!!!
Thanks!
It does not seems to work. I get the following error: Error in .local(x, ...) :
unused arguments (i = NULL, j = list(2:6, 7:11), indent = 1, ihead = -1)
Using a modified example:
models <- list()
models[['OLS']] <- lm(mpg ~ factor(cyl), mtcars)
models[['Logit']] <- glm(am ~ factor(cyl), mtcars, family = binomial)
models2 <- list()
models2[['OLS']] <- lm(mpg ~ factor(cyl), mtcars)
models2[['Logit']] <- glm(am ~ factor(cyl), mtcars, family = binomial)
tabmod1<-modelsummary(models,
shape = term ~model+ statistic,
statistic=c(c("conf.int",
"std.error",
"p.value")))
tabmod2<-modelsummary(models2,
shape = term ~model+ statistic,
statistic=c(c("conf.int",
"std.error",
"p.value")))
rbind(tabmod1,tabmod2)
Very sorry. I looked into this a bit and did not find an easy solution.
Closing this issue, not because I don't find it interesting, but because I will not have the time to work on a rather niche issue.
If it were me, I'd probably save as output="data.frame"
, build the table I actually want, and then feed that to tinytable::tt()
.
I'd be happy if someone else comes along to look into this.
Good luck.