Applied Econometrician trying to learn something new any now and then. My weapon of choice...
@Stata
!
I can cheer for two 🇧🇴 & 🇺🇸 now.
And then the were two!
As we progress on DID, a new version for
#jwdid
(or DID Mundlack style) is on. A simple script that should make your life easier applying the
@jmwooldridge
approach to DID.
It comes with a surprise. You can use it for logit/poisson models!
For those using
@jmwooldridge
's "Introductory
#Econometrics
" book, you probably know about Florian Heiss & Daniel Brunner books for Learning
#R
and
#Python
Great news now there is one more using
#julia
!
Great way to learn all the basics!
For now he also has the pdfs!
I think it's done.
@AsjadNaqvi
Here is a graph for Intergenerational Mobility (data from NLSY79-97)
The thickness of the line represents the Share of people moving from a particular quantile to another.
Hi everyone, it’s out on Ssc
#jwdid
a command to estimate twfe DID using mundlak approach. Install it (ssc install), use it, test it. Let me know if you want to see other things
#playingwithstata
Using
#csdid
? wanted to go faster in
@Stata
?
well, there is
#csdid2
! Just fresh out of the Stata-oven.
Please try it on. and let me know if you encounter problems (specially compared to
#csdid
)
My brilliant co-authors Arne Nagengast
@ArneNagengast
& Yoto Yotov
@YotovG
and I propose a fast & flexible Stata command for heterogeneity-robust DiD estimations of gravity equations & more, and we study the impact of the Single Market on intra-EU trade.
Bringing more
#joy_plot
to
@Stata
. New version of joy_plot. Main changes: You can use it with Stata 14 (or earlier?) and you can use 2 dimensions!
So, Which one is better for comparing wages:
- overlapping densities, or
- half violins?
A new update for
#csdid
and
#drdid
! fixes a bug found by
@agoodmanbacon
regarding time gaps.
adds a new command -csdid_rif- to construct tables and report uniform confidence intervals for any "RIF".
You can also save the RIFs for all aggregations.
Questions? send me an email!
and Just a bit after the two-week mark,
#CSDID
is ready for testing!
This version estimates the asymptotic version of all estimations and aggregations. But yes, the WB version will be coming! For details check it out here:
(1/6)
While working on DID, sometimes everything looks like an event study. So, I decided making a small experiment. What is the wage gain of becoming a union worker?
#EconTwitter
Quick question to ppl using DID, specifically Callaway and Sant'Anna (2020). What features of the estimator would you like to be clarified, from the applied perspective?
Trying to put some of this on the companion paper for csdid/drdid
And more color for
@Stata
.
#mscatter
new version on Github. You can now also add "fitted" values to your plots, and "drop" the scatter too
mscatter y x, over(z) fit(qfitci)
#playingwithstata
#CSDID
is getting a make-over!. For large projects it gas slow. Some times very. The bottle neck Data management in large samples.
New version is more efficient! Works with Mata, using multiple "frames".
Following
@AsjadNaqvi
example. New command on SSC. color_style. A wrapper for colorpalette and grstyle to easily change colors in your figures.
More coming soon
How do you estimate marginal effects for the following model in
@stata
:
y = a0 + a1 * x + a2 *x^2 +e
Answer: use margins!
What if your model is
y = a0 + a1 * x + a2 *x^0.5 +e
Answer: use f_able + margins!
Small Update on
#jwdid
!
An update is up, with a more appropriate calculation of Dynamic effects (pretreatment).
Interestingly: csdid, long = jwdid, never!
Seems more and more methods are connected at their core
I haven't made an update to the DID commands I worked on. So forthcoming,
#jwdid
will allow for Constrained Heterogeneity: Event, time, and cohort. In addition to other model specification options. All towards using the command for
#GravityModels
.
#StataEcon21
presenter:
@friosavila
from
@BardCollege
is part of this year’s presenter lineup, with his "drdid and csdid: Doubly robust DID with multiple time periods" presentation.
You can view all the scheduled talks by visiting
And after few days, an update!
#CSDID
V1.5 is out!. The main change. Aggregations are now quick. And it now allows you to save all RIF's (or IF's + means) as datasets, so you can use those files to rerun the aggregations with WB SE.
So, I still need to understand how controls are introduced in the approach suggested by
@jmwooldridge
. However, to compare results with other procedures, I decided to make a small script for the implementation. (no controls yet)
How far would DID go?
Just continuing on the previous example for DID. Now using the program did_imputation without additional steps. As Before, it seems that there is a positive effect of unions on wages, but with some anticipation.
Do you have brackets data? do you need to use it for regression analysis, or inequality analysis, but don't know how.?
Go beyond interval regression! Here
we suggest a multiple imputation approach that would easily allow you to do so! in
#Stata
!
About Rolling Regressions for DID.
As some of you know, one of the approaches to estimate ATTGTs is to concentrate on individual 2x2 cases.
In CS2022, for example, the attgt is defined as
ATTGT=E(Y_t-Y_{g-1}|G=g) - E(Y_t-Y_{g-1}|C=1)
Personal News! A paper with
@GCanavire
and
@flasacco
on better use of intervalled censored data has been accepted at the Journal of Economic Inequality!
A summary:
The paper:
and examples:
Hello everyone, an update on "xtheckmanfe". This is my own take on
@jmwooldridge
Correlated random effects selection model for panel data. For the case with selection only, it now allows to estimate standard errors via bootstrap, and via -two-step-ml-.
#EconTwitter
Is anyone using the TWFE DID approach described by
@jmwooldridge
with covariates? I'm looking to cross-check some of the details on the implementation
Mini update with
#drdid
. Now all RC estimators are replicated. Just need to add them to the command.
And I think. Voala drdid.ado ready to rumble
#playingwithstata
One more add-on to
#jwdid
. Now you should be able to estimate constrained heterogeneity
Baseline: full cohort calendar
Others: twfe, event only, calendar only, group only. Restricted event cohort.
And continuous treatment (under linearity)
Hello everyone,
Finally some progress regarding
#CSDID
. As I mentioned already, the baseline estimator command is ready. And it produces the Normal based standard errors and confidence intervals. Similar to what -att_gt- does. (1/4)
Do you know why you should never merge m:m? well, check this out:
So if you think you need merge m:m, probably you need to joinby!
#playingwithstata
@Stata
To cluster or not to cluster? Today, I show a bit of simulation evidence of what happens when unobserved individual effects exist, but one doesn't control for it. Short answer? One becomes overconfident.
#stata
#playingwithstata
Something people like about
#csdid
is that it provides Uniform confidence intervals (via Wboot). Few other commands allow you for that. (I know for a fact
#jwdid
doesn't!)
Except that now you can do it as a post-estimation!
see
#uci
here:
What type of time gains?
Based on 1 experiment. Fake data, 1 control, Method Regress (fastest). 10000 individuals, 25 periods, 14 cohorts.
Current CSDID -> About 400secs
New one CSDID2 -> 10 Secs!
Hopefully Scales up nicely!
And recent paper with
@StephenPJenkin1
, further evidence of using linked data for the UK. How important are measurement errors? and how can we improve the data? Is survey or administrative data better?
Still more to come.
Inspired by
@AsjadNaqvi
I started looking at the DRDID. and here is my take.
I can now replicate the example from the R DRDID. Next, the standard errors! (and a wrapper)
@causalinf
And some few changes on a couple of commands (ridgeline_plot and joy_plot).
All changes on Github
One of these is a joy! the other a ridge!
#playingwithstata
And one more surprise. The latest issue of Stata Journal is out, and so is my contribution. Using margins with not-so-common variable transformations. Going beyond mere Polynomials!
#playingwithstata
Continuing on my data exploration on time use. And show a case of new command (joyplot).
Even on weekends, seems that men don't put much time into supervising young children (10 or younger)!
Data: ATUS-2019
#playingwithstate
@rindeh_andaaz
@pedrohcgs
@causalinf
The default estimator in R is DRIPW, whereas in Stata I decided using drimp (look in to Pedro's previous Doubly robust paper). This explains differences in effects
Regarding standard errors. Stata default is asymptotic, whereas R's default is the uniform WB bands.
Today my dad would have been 91! We really miss him. However, you can see he is still having his way. In La Paz they are preparing the largest Chairo ever made (his and my favorite soup!)
Feliz cumple papa!
Today is a great day! 2 big events
Feliz día Bolivia!
And just as important. Feliz cumpleaños Abby! Mi hijita preciosa! Gracias por ser nuestra luz en tu primer añito!
A
#Stata
reminder: you can install and use plenty of custom schemes: e.g. plainplots by
@DanBischof
, cleanplots. I have a dozen of them here: .
If you are ambitious here is a guide on how to make your own schemes:
#TGIF
Not sure if you are aware, but Tim Huegerich put together a very flexible Stata kernel (nbstata) that works with Quarto!.
One mini example:
Code and Formats:
HTML:
#nbstata
#stata
Weeks ago
@paulgp
asked about options to share data, he couldn't share (proprietary data). I'm currently facing a similar problem, so came up with a potential solution. Synthetic data based on Multiple Imputation.
Comments welcome!
#playingwithstata
A well deserved prize to
@friosavila
! Not only a great coauthor, but also an exceptional friend. Well-deserved recognition with The Stata Journal Editors’ Prize 2023!
@Stata
I worked with her on her thesis few years ago. Now she is graduating as a PhD and entering the Job market. She will be a great addition to any program!
Hello
#Econtwitter
! I am on the
#EconJobMarket
this year, and I am happy to share my
#JMP
: “The Heterogeneous Value of Four- and Two-Year College Choices”
You can find the full paper and more about my research on my website:
This is based on the Extended TWFE
#jwdid
, which now comes with many other options that support the estimation of Gravity models but allow for other non-linear models as well.
It even allows for some covariates heterogeneity and DDD. See here
And while new packages on DID are released, and I cooldown from
#CSDID
and
#DRDID
let me share with you a piece of thought regarding DID with multiple periods
Plotting coefficients for quantile regressions in
@Stata
is easy with -grqreg-, but only if you estimate them with -qreg- (or its friends), and the model has no factor notation.
Answering my own question. Does transforming variables affect how Synthetic control operates?
This example suggests, probably not.
Next step, See how this insight plays with SCDID
Here a snapshot of the replication.
Just need to double-check how and why standard errors do not match...Still.
Anyways, although a bit late understanding this, I'm ever closer to a native DID for
@Stata
!
@pedrohcgs
@AsjadNaqvi
@causalinf
Looking at Time on Household Production (2019). Seems that men push forward on the weekends and try to catch up a bit with housework. Giving a bit of a break to women.
📢📢Hello
#EconTwitter
,
#PoliSciTwitter
, and all people curious (or overwhelmed) about the advances in Difference-in-Differences methods!
In partnership with
@StatHorizons
, I will offer a new session of my DiD course on Oct. 14-16, 2021.
Information: