<p>In addition to stargazer, you can also try to use model summary package. I used to use stargazer, and stargazer is very good if you need just quick table, but model summary gives you more options and control over the table.</p>
<p>Quick example;</p>
<pre><code>install.packages('modelsummary')
library(modelsummary)
mod &lt;- lm(y ~ x, dat)
modelsummary(mod, output = &quot;table.tex&quot;)
</code></pre>
<p>See the <a href="https://modelsummary.com/" rel="nofollow noreferrer">package manual</a> for more details.</p>

CC BY-SA 4.0
2024-04-11T22:24:36.437Z
2024-04-11T22:24:36.437Z
1muflon1
<pre><code>install.packages('stargazer')
library(stargazer)

x1 = rnorm(100)
x2 = x1 + rnorm(100)
y = 2*x1+3*x2
model = lm(y~x1+x2)

stargazer(model)
</code></pre>
<p>And if you are using the package 'fixest' for estimation (which is a good idea because it is fast if you have many fixed effects) then you can use the function table() as documented via this link</p>
<p><a href="https://www.rdocumentation.org/packages/fixest/versions/0.3.1/topics/etable" rel="nofollow noreferrer">https://www.rdocumentation.org/packages/fixest/versions/0.3.1/topics/etable</a></p>

CC BY-SA 4.0
2024-04-11T20:09:28.300Z
2024-04-12T13:41:33.763Z
2024-04-12T13:41:33.763Z
Jesper Hybel
<p>How do I present a difference-in-differences regression output like the following in R?</p>
<p><a href="https://i.sstatic.net/CM6wh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CM6wh.png" alt="" /></a></p>

CC BY-SA 4.0
2024-04-11T19:16:45.747Z
TRY STARGAZER PACKAGE
Jesper Hybel
<econometrics><r>
How to present a Difference-in-Difference regression output using Rstudio?
asdf
# How to present a Difference-in-Difference regression output using Rstudio?

(Asked by: username_0 on 2024-04-11)

How do I present a difference-in-differences regression output like the following in R?

[![](https://i.sstatic.net/CM6wh.png)](https://i.sstatic.net/CM6wh.png)

**Tags:** econometrics, r

> **Comments:**
> **username_1**: TRY STARGAZER PACKAGE  

---

## 2 answers

### Answer by username_2 on 2024-04-11. Score: 3

In addition to stargazer, you can also try to use model summary package. I used to use stargazer, and stargazer is very good if you need just quick table, but model summary gives you more options and control over the table.
Quick example;
install.packages('modelsummary')
library(modelsummary)
mod <- lm(y ~ x, dat)
modelsummary(mod, output = "table.tex")

See the package manual for more details.


---

### Answer by username_1 on 2024-04-11. Score: 3

install.packages('stargazer')
library(stargazer)

x1 = rnorm(100)
x2 = x1 + rnorm(100)
y = 2*x1+3*x2
model = lm(y~x1+x2)

stargazer(model)

And if you are using the package 'fixest' for estimation (which is a good idea because it is fast if you have many fixed effects) then you can use the function table() as documented via this link
https://www.rdocumentation.org/packages/fixest/versions/0.3.1/topics/etable


---

