ky Profile Banner
ky Profile
ky

@kylefbutts

3,400
Followers
2,146
Following
384
Media
7,446
Statuses

incoming AP at U Arkansas; econ PhD at CU Boulder

Joined December 2010
Don't wanna be here? Send us removal request.
Pinned Tweet
@kylefbutts
ky
2 years
Mixtape Sessions 🥳FREE🥳 library now has 4 complete courses (and our revamped diff-in-diff/synthetic control course is a WIP) --- What we have ...
Tweet media one
1
78
331
@kylefbutts
ky
3 years
R has a reputation of being terrible at running regressions. This is no longer true, thanks to -fixest- package. I made a Stata -> R Cheatsheet to try and prove it @lrberge single-handedly remade all the good features of stata. It's truly a feat
Tweet media one
34
301
2K
@kylefbutts
ky
3 years
🎁New gift alert:🎁 The entire diff-in-diff robustness check in one R function: Beta mode, so please report any bugs if you try it!!
Tweet media one
Tweet media two
7
140
812
@kylefbutts
ky
3 years
Introducing w @nickchk and @grant_mcdermott Hopefully makes the Stata -> R pipeline much easier. - data-wrangling with {data.table} - regression analysis with {fixest} These packages are blazingly fast 🏃🏻💨, highly powerful 💪🏻😎, and flexible 👌✨
Tweet media one
12
150
742
@kylefbutts
ky
3 years
🚨 Beamer Slides Template 🚨 My attempt at making beautiful beamer slides easy. h/t to @paulgp 's beamer tips for a lot of inspiration. pdf preview: source code: Details...
Tweet media one
8
100
741
@kylefbutts
ky
3 months
Michal Kolesar's Advanced Applied Econometrics lecture notes are a delight
Tweet media one
4
159
745
Semestrial reminder that *all* our workshop materials at is available for *free* on GitHub (and growing):
Tweet media one
4
151
726
@kylefbutts
ky
3 years
How I go from historical tables on the left -> pretty clean csv data on the right?
Tweet media one
Tweet media two
9
66
461
@kylefbutts
ky
2 years
Built this for @causalinf 's Mixtape Sessions next week. As always all this work is generating open source material. Build some intuition on optimal bandwidth selection @maxhfarrell
Tweet media one
6
62
457
@kylefbutts
ky
3 years
#EconTwitter , I don't know if folks know this, but Davidson and MacKinnon's two books are free to download online now Econometric Theory and Methods: Estimation and Inference in Econometrics:
7
140
431
@kylefbutts
ky
9 months
While prepping my JMP slides, I've made some pretty cool updates to my latex slides template: - color rows/cells (with reveal options) - bottom left beamer buttons: \bottomleft{} - customize theme colors(!) - full-size figures: \imageframe{}
Tweet media one
9
42
401
@kylefbutts
ky
2 years
@causalinf and I finished the first half of our flagship causal inference course. All the material (besides Scott of course) is *available online* and *free* for anyone to use 🥳🥳
2
91
397
@kylefbutts
ky
4 years
@causalinf and I compiled all the R scripts from his new book and created teaching assignments that can be run directly from R Studio with questions for students. Here is an example from his chapter on Regression Discontinuity:
4
72
376
@kylefbutts
ky
2 years
🌠🔭I wrote a blog post about all the weird diff-in-diff settings people email and ask me about (continuous treatment, treated multiple times, treatment turning on and off)
Tweet media one
3
54
357
@kylefbutts
ky
2 years
So happy with how Brigham Frandsen’s Machine Learning for Causal Inference workshop turned out. All the material, per usual, is free to use!!
4
79
346
@kylefbutts
ky
3 years
New WP 🎷🎷 The ring method: when treatment occurs in a specific location, use inner-ring as treated & outer-ring as control group. Researchers use this all the time, but no one has formalized the necessary assumptions... *horns intensify* 👉
Tweet media one
12
57
344
@kylefbutts
ky
6 months
This fall, I have taken a job as an AP at the University of Arkansas !! As I have done (annoyingly) around the house for the last week: WOOOO PIGGGG I'm so thankful to all those that have helped along the way:
39
3
295
@kylefbutts
ky
3 years
New WP🤌 Often, people use Regression Discontinuity with some administrative border as the cutoff. This can be bad if: 1. People sort on either side of the border (better schools or lower taxes) 2. Many laws change at border...
Tweet media one
7
54
280
@kylefbutts
ky
10 months
Really great timing on this R&R 🥳
Tweet media one
10
16
271
@kylefbutts
ky
3 years
🚨Latex Article Template🚨 Folks really seemed to like my slides, so here's the article template I have been using. pdf preview: source code:
Tweet media one
Tweet media two
Tweet media three
4
40
267
@kylefbutts
ky
3 years
PSA:
Tweet media one
9
19
261
@kylefbutts
ky
3 years
Opinionated Latex table tip: You should output only the body of the table in R/Stata and do everything else in latex. This makes it simple to set up multicols, alignment, footnotes, etc. without trying to learn all the stata/R options.
Tweet media one
Tweet media two
10
32
255
@kylefbutts
ky
3 years
Want to see visually the problems with TWFE Diff-in-diff with differential timing? Try out a shiny app and see when TWFE works particularly poorly: If you use RStudio, save compute time for other ppl and run locally plz:
Tweet media one
3
52
252
@kylefbutts
ky
2 years
🚀 What do you think the best written econ paper you've ever read is? 🚀 PLEASE submit it here. Mixtape Sessions is trying to make a catalog of > 100 awesome papers folks can look through to inspire their writing
Tweet media one
11
36
233
@kylefbutts
ky
3 years
#EconTwitter If you have not used pandoc before, it's really remarkable. In one line, I went from latex to docx and it works amazingly. Even matches the formatting of my custom latex template pandoc paper.tex -o paper.docx
Tweet media one
Tweet media two
6
34
227
@kylefbutts
ky
10 months
stata2R, our guide on learning R for stata developers has fresh new paint powered by @astrodotbuild : The built in search is fantastic for quickly finding a topic @grant_mcdermott @nickchk
Tweet media one
4
50
207
@kylefbutts
ky
3 years
WIP: Event-study estimates in R all in two commands. Just need to add did_imputation by @borusyak et. al.
Tweet media one
6
16
179
@kylefbutts
ky
3 years
Just got my first R&R !! On a Friday night, no less
@kylefbutts
ky
3 years
New WP🤌 Often, people use Regression Discontinuity with some administrative border as the cutoff. This can be bad if: 1. People sort on either side of the border (better schools or lower taxes) 2. Many laws change at border...
Tweet media one
7
54
280
7
4
174
@kylefbutts
ky
2 years
🎉 New Working Paper: This paper, joint with Nick Brown, shows how to estimate treatment effects *when* parallel trends fails Full paper & 5 Minute Summary:
Tweet media one
3
35
174
@kylefbutts
ky
3 years
new tools from the metrics world 🔨🔨 I'm a big fan of John Gardner's new working paper on two-stage diff-in-diff and made it into an R package. It fixes TWFE estimators for static and event study estimates! install here:
4
31
168
@kylefbutts
ky
2 years
This is really exciting. You can read a 5-minute summary of this paper here (on the new version of my website):
@JUrbanEcon
Journal of Urban Economics
2 years
New in #JUE : "JUE Insight: Difference-in-Differences with Geocoded Microdata" #UrbanEcon #EconTwitter
2
36
162
8
27
153
@kylefbutts
ky
3 months
With another course coming to a close, all the course material is now a public good!!! I might summarize @instrumenthull 's class as "we think something random is occurring, how do we use this to estimate effects?"
1
31
152
@kylefbutts
ky
3 years
Would #rstats folks read/watch me working on Rcpp programs that speed up my workflow? I think there's perhaps a missing supply of beginner Rcpp usage
13
5
148
Wrote a blog post about how understanding factor models help me understand the synthetic control method much better: 👉🏼
Tweet media one
5
29
144
@kylefbutts
ky
3 years
🥳 New WP with John Gardner introducing the R package `did2s` to estimate TWFE/Event-study with staggered treatment article: If anything is confusing please let me know :-) 1/n
1
25
140
@kylefbutts
ky
2 years
New blog post showing why with `did2s` you don't need to include individual fixed effects (instead just treatment-timing group FEs). You'll get numerically identical results from @jmwooldridge 's new paper! Major speedups for people with big data!!
2
30
131
@kylefbutts
ky
2 years
Working on interactive Shiny apps for @causalinf 's Causal Inference mixtape session next week. Check out this WIP for randomization inference #RStats #Shiny
Tweet media one
1
13
131
@kylefbutts
ky
2 years
Announcing a new online seminar series for graduate students doing urban (or urban adjacent) economics organized by @santiagohermo , @_Hector_Blanco , @Jon_Hartley_ , @laurayww and myself Sign-up to attend or to present!!
2
51
129
@kylefbutts
ky
8 months
WIP: Write R scripts like you normally do and have them automagically turn into a git-friendly log book that you can share with your coauthors using @quarto_pub
Tweet media one
Tweet media two
1
10
116
@kylefbutts
ky
7 months
log(x+1) is down. well well well, hello log(x+2) my new friend… Just kidding; this paper is a delight of a read. Crisp and clear
@QJEHarvard
QJE
7 months
Recently accepted by #QJE , “Logs with Zeros? Some Problems and Solutions,” by Chen ( @jiafengkevinc ) and Roth ( @jondr44 ):
4
195
726
2
5
110
@kylefbutts
ky
5 months
Guido Imben's review on using covariates for treatment effect estimation is great: Interestingly, the title changed from "Semiparametric" to "Nonparametric" Estimation when the published version at RESTAT came out 🤔.
0
28
102
@kylefbutts
ky
10 months
New package `fwlplot` is ready to be tried out by some volunteers! This is a 1:1 drop-in replacement for `feols` but instead produces a scatter plot of residualized y on residualized x (first x-var in formula). Works with fixest multi features, e.g.
Tweet media one
1
13
99
@kylefbutts
ky
3 years
See problems with TWFE event-study estimates. Example:
Tweet media one
2
11
99
@kylefbutts
ky
3 years
Easy standard errors, first-class post-estimation commands, lag/leads/differences, IV All this while being the fastest regression software out there!!
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
11
97
@kylefbutts
ky
2 years
Really cool paper in JUE this week. Say a nice new apartment opens up in your city, what happens? I'll tell you two plausible stories, and this paper (along with a similar paper by @EvanMast2 ) can point us to which seems to be happening
4
31
96
@kylefbutts
ky
2 years
I cracked a metrics problem that I've thought about for over a year and a half today. Feeling pretty stoked!!
2
0
94
@kylefbutts
ky
3 years
My function `did2s` is like 90% just a wrapper around @lrberge 's fixest package (w/ standard error adjustment). It is crazy good. It can do FEs faster than anywhere else, IV, GLM, export results to figures and tables incredibly easily. Check it out!!
2
13
90
@kylefbutts
ky
9 months
This course is a really great one. Developed this app to build intuition on linear shrinkage estimators (on simulated school value-added data) Shiny app: More info on the course:
Tweet media one
@c_r_walt
Christopher Walters
9 months
Next week I'm teaching a Mixtape Session on Empirical Bayes. Register at the link below if you want to learn about using EB methods to quantify heterogeneity, "borrow strength" to improve treatment effect estimates, and make decisions:
1
15
128
1
13
81
in our lovers era (btw we got engaged !!!)
Tweet media one
Tweet media two
5
0
80
@kylefbutts
ky
2 years
I’m looking for diff-in-diff papers where the author proposes a mechanism for how D affects Y (preferably with publicly available data)
5
12
76
@paulgp @grant_mcdermott Update to R 4.3.0, and you can use `_[]` in pipes. I'm super pleased
Tweet media one
7
1
73
@kylefbutts
ky
3 years
Code to implement two-stage diff-in-diff are here! Stata: R:
@causalinf
scott cunningham
3 years
Finally finished my substack on John Gardner’s “two stage difference-in-differences”. I’ll do a brief summary here.
4
39
169
0
16
75
@kylefbutts
ky
8 years
Thanks for sharing sunshine and political revolution with us today :) @shailenewoodley @kendrick38 @rosariodawson
Tweet media one
0
25
64
@kylefbutts
ky
2 years
If you want to update to Stata 17 without paying, use this trick: right click Stata and select "get info". Then drag and drop the Stata 17 icon. Taadaa ✨✨
Tweet media one
Tweet media two
0
2
68
@kylefbutts
ky
2 years
I'm really excited about this one. This Saturday, the first "frontier" course for Mixtape Sessions for Shift-Share Instruments. The material is beautiful (💅) and features a coding lab (⌨️) to get your hands dirty
1
7
68
Workers who reside in urban areas earn a large premium over non-urban workers. Is this driven by sorting or due to agglomeration effects of cities? And how does this change as we go back in time? New working paper w/ @kitchct and Taylor Jaworski: 1/N
Tweet media one
2
20
64
@kylefbutts
ky
3 months
fixest tip: you can "attach" a custom variance-covariance object to a fixest estimate using `summary`. The custom vcov gets used with `vcov(x)`, so it works with `modelsummary`, `etable`, `iplot`, etc. e.g. with bootstrap standard error:
Tweet media one
0
11
62
@kylefbutts
ky
3 years
Shiny app to see the @agoodmanbacon decomposition theorem: Two recommendations on things to try to gain insights into the paper ...
Tweet media one
@pedrohcgs
Pedro H. C. Sant'Anna
3 years
So good to see another recent and influential DiD paper finally published in one of my favorite journals: Congrats @agoodmanbacon !!
4
51
390
1
16
59
@kylefbutts
ky
2 years
#RStats Started working on a mega blog post all about TailwindCSS and why I think it will make designing apps with #Shiny so much easier #WIP
2
7
58
@kylefbutts
ky
2 years
This might be the best course material we've made so far. Look at how good everything looks. Code with interpretation built-in and beautiful slides (if I say so myself)
Tweet media one
Tweet media two
Tweet media three
@causalinf
scott cunningham
2 years
Four more days (Mar 21) until @instrumenthull workshop at Mixtape Sessions on shift-share ("Bartik IV"). If you are interested in topics even remotely within rocks throw of labor, immigration, trade and macro, highly recommend.
2
13
71
1
7
58
Boston making monocentric city models proud 🥲
Tweet media one
3
1
55
We'll be talking about how to go from (a) to (b) next week :-) ...no guarantees it will work as well in your setting ;)
Tweet media one
@RUSHBrownbag
RUSH Brownbag
1 year
Next Wednesday, April 5th at 11am EST, we're back! Kyle Butts present his work on imputation estimators in factor-models Sign-up to attend: Full Schedule:
Tweet media one
0
1
15
1
4
58
@kylefbutts
ky
3 years
`did2s` has come to Stata now too. All the details here:
@kylefbutts
ky
3 years
new tools from the metrics world 🔨🔨 I'm a big fan of John Gardner's new working paper on two-stage diff-in-diff and made it into an R package. It fixes TWFE estimators for static and event study estimates! install here:
4
31
168
1
13
55
@kylefbutts
ky
10 months
This is such a fun profession. This tweet led me to my JMP...
@kylefbutts
ky
3 years
#EconTwitter Do fixed effects still control for a time-invariant variable if the coefficient on the variable changes over time? E.g., wage on education. Work ethic doesn't change over time, but the returns to work ethic do.
3
1
14
1
1
54
@kylefbutts
ky
6 months
Been formalizing a lot of my workflow into R packages. Today, I have added `tikzsave` to `kfbmisc` package for making figures: ggplot() -> tikzpicture -> pre-compiled into pdf (using latex themes)
Tweet media one
0
4
56
@kylefbutts
ky
2 years
Three-stage did prototype is functional now (the third stage is for time-varying covariates !!!) Does anyone want to help me debug and try with their project? DM me!
Tweet media one
2
7
54
@kylefbutts
ky
3 years
#rstats is a game-changer for teaching R in blog posts. Just by adding comments, torchlight can highlight lines, make collapsible code, git-style diffs, focus lines (unblur on hover), and more. All with your VSCode theme!! Try it:
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
10
53
@kylefbutts
ky
3 years
#RStats Here's my submission to the RStudio Table Competition. Designed with @tailwindcss using my package shiny.tailwind. Tailwind makes it so easy to design shiny apps
2
12
52
Happy (incredibly annoyed) to announce the 1-line update to did2s has hugely sped-up did2s for large datasets (something like 20x) 🤦🏼‍♂️:
Tweet media one
Tweet media two
0
2
53
@kylefbutts
ky
5 months
One step closer to dream of `NBER` ggplot2 theme :-)
Tweet media one
@thomasp85
Thomas Lin Pedersen
5 months
One of the big improvements in the new version of #ggplot2 are related to legends. @TeunvandenBrand lays out all the detail in this blog post. Get ready for the legend extension extravaganza #rstats
0
33
173
1
6
49
@kylefbutts
ky
2 years
most data science is data cleaning. Over 1000 lines of code cleaning addresses 🫠
Tweet media one
3
3
49
@kylefbutts
ky
3 years
#EconTwitter I'm looking for example papers that use this identification strategy: Treated units are in a treated boundary (or within a ring from treatment location) and Control units are just outside of the boundary (just outside this ring)
Tweet media one
21
11
47
@kylefbutts
ky
3 years
I really love this paper, but I wanted to highlight one thing that I think @pedrohcgs (among others) gets totally right in this literature: Instead of starting with an estimator and try and figure out what you estimate, you should just start with an estimand! 1/2
@pedrohcgs
Pedro H. C. Sant'Anna
3 years
🚨Updated Working Paper Alert🚨 "Efficient Estimation for Staggered Rollout Designs", joint with @jondr44 (). This paper is all about how we can do better than DiD in setups with quasi-random treatment timing! 1/n
Tweet media one
4
62
309
1
4
47
@kylefbutts
ky
5 months
@tcarpenter216 I help run . We have all our course material online on . We have a live course on diff-in-diff next weekend :-)
2
6
46
@kylefbutts
ky
11 months
ICYMI: Urban/Housing PPL 📣 The FHFA has a new tract-level repeat-sales housing price index (1989-2021) with >65,000 tracts using data from Fannie Mae and Freddie Mac, CoreLogic county recorder files, and FHA mortgages
1
17
45
@kylefbutts
ky
3 years
1. Using LayoutParser by @MelissaLDell and coauthors, I extract the actual table from the sheet
Tweet media one
1
1
45
@kylefbutts
ky
10 months
I'm on the job market and can't let myself get distracted by dumb open source ideas, but it would be really cool to have an easy way in ggplot to put the legend like this and the y-axis label like this. NBER graphs always are 👨🏼‍🍳🤌🏼
Tweet media one
3
3
44
@kylefbutts
ky
2 years
This Friday and Saturday, Mixtape Sessions is hosting Doing Applied Research. There's so many great insights in these slides! Perfect for junior researchers Full Schedule:
Tweet media one
Tweet media two
0
7
45
@kylefbutts
ky
6 years
I'M SO EXCITED TO READ @curaffairs
Tweet media one
Tweet media two
0
2
41
@kylefbutts
ky
3 years
Just wrote code in C++ in parallel using RcppParallel and code ran from 45 minutes to 3 seconds 🤯
2
0
42
@kylefbutts
ky
3 years
Can Econ just require ": Evidence from earth" if the author doesn't include a "Evidence from" statement in the title
Tweet media one
2
0
41
@kylefbutts
ky
2 years
Helping @instrumenthull prepare for his IV workshop on Friday and he has a set of simulations for weak and many instruments that blew my mind 🤯
3
2
39
@kylefbutts
ky
2 years
@paulgp here is a little trick I learned:
Tweet media one
1
2
40
@kylefbutts
ky
5 months
Night 1 of Demand Estimation with @jeff_gortmaker went fantastic. Ariel Pakes started us off with a history lesson on Demand Estimation and what came before BLP
0
4
38
@kylefbutts
ky
3 years
Haven't even put it out yet, but I just referenced my WIP data.table guide w @nickchk and @grant_mcdermott to remember how to drop duplicate observations
Tweet media one
1
0
38
@kylefbutts
ky
2 years
The { here } package is awesome in R. Notice how weird of a location my script file is. here::here() gives me the absolute path relative to the root folder no matter where the script file is. A bit more details ⬇
Tweet media one
@AeaData
AEA Data Editor
2 years
Please stop using "cd" (in Stata) or "setwd()" (in R) all over the place. Once (maybe, not really), that's enough. Can we mark those commands as "deprecated"?
21
63
636
2
3
38
ChatGPT'd my way from an idea to a package in 1 hour: 🏎️💨 fast Rademacher weights in Rcpp
Tweet media one
5
1
38
@kylefbutts
ky
3 years
Used blastula and #Rmarkdown today to send out customized midterm reports for students. So simple, it took less than an hour from drafting to emailing. Reach out if you want to know how!
Tweet media one
4
2
34
@kylefbutts
ky
2 years
Citing software you use is really really a good way to encourage people to code estimators for you ! In R, type citation(“package”) and it will tell you how to properly cite it!
@willwheels
Will Wheeler
2 years
@wytham88 That's a good point. I'd also think about the value of having public code vs. a formal package. A lot more work is involved w/ the latter, so it's great when people can do it (thanks @grant_mcdermott and @kylefbutts !!!). Adding Sun and Abraham to fixest is a great idea, e.g.
1
0
1
0
3
33
@kylefbutts
ky
3 years
Visual Studio Code is great. Here's some reasons:
@causalinf
scott cunningham
3 years
What text editor for programming are you guys using? I’m switching from Textmate 2 to one called Visual Studio Code bc @kylefbutts was raving about it a few months ago. I was using Textmate 2 for a while and loved it so may go back. Just curious.
25
1
35
3
4
34
@kylefbutts
ky
3 years
Hi #rstats , I'm teaching R this fall and was wondering if folks have material to recommend and/or experiences to share! :-)
8
6
33
@kylefbutts
ky
3 years
If you have panel/repeated cross-sectional data before and after the treatment, then you can use a Difference-in-Discontinuities estimator to fix these problems Yes Diff-in-Disc, not Diff-in-Diff :-)
1
2
32
@kylefbutts
ky
2 years
Besides @jondr44 , I might be the only researcher who's excited to have these bad of pre-trends
Tweet media one
2
1
32
@kylefbutts
ky
2 years
Hell yeah, GitHub lets you use latex equations in markdown documents now:
0
5
32
@kylefbutts
ky
5 months
#EconTwitter If I run a regression with outcome y, a variable of interest x and controls W and I want to plot the variation, I use FWL and scatterplot y_resid on x_resid. What would you do in the case of IV?
6
4
32
Officially Dr. @hannah_denker !! She’s the most intellectually-honest and caring researcher I know 💜
Tweet media one
1
0
31
@kylefbutts
ky
2 years
I think the most fun part of the job is getting to try and explain fancy econometric methods in really intuitive ways. It feels like a big puzzle. #EconTwitter #WIP This is the paper I'm applying:
Tweet media one
1
4
30
@kylefbutts
ky
2 years
After more than one year, I finally have closed this issue 🙏🏼🙏🏼
Tweet media one
1
0
30