Discover and read the best of Twitter Threads about #Stata

Most recents (21)

URL sharing is essential for online platforms and applications. It allows users to access specific resources on the internet, such as web pages, images, videos, files, and more. #APIs make sharing URLs even more seamless, like those offered by OpenDOSM
With URL sharing APIs, developers can provide users with a more streamlined experience, allowing them to share URLs and other data without leaving the application. This can drive more traffic to the platform and increase user engagement. #OpenData #API
A URL sharing API can improve the overall user experience, making it easier for users to quickly and easily share URLs and other data. This is especially useful for social media platforms and applications that rely heavily on user-generated content. #OpenDataAPI
Read 6 tweets
Top 25 #Stata Commonly used Visualizations with full replication code is now up!

Link:
medium.com/the-stata-gall…

#Stataviz #Dataviz #TheStataGallery #visualization

Do press clap at the bottom of website if you like and want more such posts.

Preview of some graphs below 👇
Scatterplot

#Stata
Counts Plot

#Stata
Read 16 tweets
The #30DayMapChallenge 2022 starts tomorrow. In the last 2 years a lot of work has been put in @Stata to mainstream some of the map elements we find in other softwares. He is a 🧵 on the different types of maps one can make. If you want the code for any, just msg! Let's go 👇
The basic #spmap package can already do a lot! Here are some examples using standard spmap syntax.

These were made for the online #GIS tutorials earlier this year that were fairly well attended! Over 1400+ registrations and 500+ ppl online. Might repeat it again. ImageImageImageImage
The #bimap package that actually was the result of the #30DayMapChallenge last year allows you to combine two variables to check for interesting spatial correlations.

Install from SSC (ssc install bimap, replace)

See GitHub for further instructions
github.com/asjadnaqvi/sta… ImageImageImageImage
Read 11 tweets
A late night 🧵 on some tips for making grayscale (BW) & colorblind (cblind) friendly graphs in @Stata. BW in case people print out papers, and cblind to make sure documents are "barrier free".

Graphs have 3 elements that we can control: colors, line patterns, & symbols.

1/
Let's start with colors: Whatever color scheme we use, we can check whether it will pass the BW and cblind tests. This can be easily tested using the palettes package. Install these, if you haven't already:

ssc install palettes, replace
ssc install colrspace, replace

2/
There are three types of common color-blindnesses that can we can check in #Stata: "Protanopia" & "Deuteranopia" where shades of red and green are not discernable, & "Tritanopia" where blue-green, purple-red, yellow-pink are hard to differentiate.

Test yourself 👇👇

3/ Image
Read 13 tweets
A 🧵 to keep track of my @Stata #dataviz packages 👇

1) 𝘀𝗰𝗵𝗲𝗺𝗲𝗽𝗮𝗰𝗸: Has a large collection of ready-to-use #Stata #schemes.

Two I personally use all the time are white_tableau (clean white) and neon (black background).

github.com/asjadnaqvi/Sta…
2) 𝗷𝗼𝘆𝗽𝗹𝗼𝘁: A #Stata package for classic #ridgeline plots

github.com/asjadnaqvi/sta…
3) 𝘀𝘁𝗿𝗲𝗮𝗺𝗽𝗹𝗼𝘁: A #Stata package for centered area graphs

github.com/asjadnaqvi/sta…
Read 11 tweets
My turn to learn the new #DiD literature.

I estimated tried as many relevant methods as I could find on two (simple) DGPs.
All #STATA code here: github.com/azev77/Compare…

#EconTwitter what did I miss? (1/n) Image
Thanks to @AsjadNaqvi @borusyak @XJaravel @jannspiess @kylefbutts @pedrohcgs @CdeChaisemartin @arindube I missed a bunch (sorry)

1: asjadnaqvi.github.io/DiD/ is maybe the best resource to learn these methods
2: the world would be much better off if these methods were implemented in a modern/fast language like #JuliaLang
github.com/JuliaDiffinDif…
by @JunyuanChenEcon

3: why doesn't anyone compare the staggered DiD methods to #SCM?
I think I'll do that...
Read 3 tweets
What to do when you're analysing data arising from a Randomised Controllled Trial (RCT) and you have noncompliance in the treatment group?
A thread on Complier Average Causal Effect (CACE) modeling... /1
#Stata #RCT #CACE #gsem
In RCTs, we compare the outcome in the treatment and the control group. When everyone in the treatment receives the treatment in full or (comply), trial arm assignment is enough to estimate the effect of the intervention. We call this "intention-to-treat" (ITT). /2
The problem is that some participants may not receive the treatment in full or comply with all the requirements of the intervention itself. This produces bias in the ITT estimate, "diluting" the effect of the intervention, which is why we need to account for noncompliance. /3
Read 7 tweets
#Olympics Athletes. #Tokyo2020 is held under a #stateofemergency . #COVID19 infections are TRIPLING and #DeltaVariant is becoming DOMINANT. Hosting the Games during a pandemic is deemed as an 'affront to humanity'. DON'T BE A PART OF IT.
#オリンピック 選手の皆さん。 #東京2020#緊急事態宣言 下で開催されます。#新型コロナ の感染は3倍に広がっており #デルタ変異株 が優勢株となるのは必至です。パンデミックの最中に大会を開催することは「人類への冒涜」とみなされます。その一端を担わないでください。
🇧🇬 #Токио2020 се провежда в условията на #извънредно положение . Инфекциите с #COVID19 се увеличават с три пъти, а #DeltaVariant става доминиращ. Провеждането на Игрите по време на пандемия се счита за "оскърбление за човечеството". НЕ БЪДЕТЕ ЧАСТ ОТ ТОВА.
Read 38 tweets
On the 1st anniversary of my twitter account, I'm happy to share w/the #EconTwitter community our #stata commands for event studies:

did_imputation: robust and efficient imputation estimator

event_plot: event study plots after various estimation methods

github.com/borusyak/did_i…
I’ve discussed did_imputation in the 🧵 on our paper w/@XJaravel and @jannspiess

Key points: the estimator is
- robust to heterogeneous effects
- efficient under homoskedasticity
- transparent
- robust to pre-testing
- works w/controls, triple-diffs, etc

Now on the plotting command:

With event_plot, you can make event study plots for at least 5 methods:
- our did_imputation
- robust estimators of @CdeChaisemartin-D’Haultfoeuille, Callaway-@pedrohcgs, Sun-Abraham
- traditional OLS

And combine them with each other if you wish! 5 event study estimators us...
Read 6 tweets
1/

Interesting study coming out suggesting full lockdowns offer no benefit over softer measures.

Great they released the code! It is worth a deeper dig as the journal is fairly vague about the data used. I've stuck the source code on my GitHub here: github.com/dr-harper/NPI-…
2/

It might sound fair to accuse me of bias, with the only reason that I question this study because it challenges my view of lockdowns.

I have seen papers suggest lockdowns don't have a big impact, but this seems to suggest they have a negative impact? What is going on Image
3/

Now, one threat not considered by the paper is potential confounding variables. See statisticshowto.com/experimental-d…

Is it fair to compare international countries purely on case rates and lockdown measures? Are there broader differences? Highly possible Image
Read 8 tweets
I am humbled and privilleged to note that my #Research paper; "Sources of #Unemployment in #Lesotho" is now available and can be accessed via the People's Republic of #China's National #Science and #Technology #Library - #NSTL. I give thanks 😎 Image
So far this year, I have successfully published three #Research articles in #Macroeconomics & #Finance, with another two in press. I am currently hammering away at a handful of working papers which will most certainly find a home in reputable #Journals, come 2021 🙏🏽🙂 Image
Im currently internalising the very insightful reviewer comments on my latest #Research paper titled; "Investigating Determinants of Commercial Bank Spreads in #Lesotho", from the good folks over at the globally reputable #International #Journal of #Finance & #Economics #IJFE 😊 ImageImage
Read 52 tweets
Today I want to give a shout-out to @TymonSloczynski paper, "Interpreting OLS Estimands When Treatment Effects Are Heterogeneous: Smaller Groups Get Larger Weights", that is currently available here:

people.brandeis.edu/~tslocz/Sloczy…

Paper is conditionally accepted at ReStat!
This is a very interesting paper that highlights some potential pitfalls of not separating the identification and estimation/inference steps when doing causal inference.

In other words, OLS may be messing up your regression interpretations.

So good to see that I am not alone!
Let go straight to the main message of Tymon's paper.

We all have seen and probably run linear regressions like this and attach causal interpretation to \tau after invoking selection on observables type of assumptions.
Read 10 tweets
Regression analysis with observational data remains the primary analytical method in political science.

However, we will never know whether we controlled for all unobserved confounders.

New sensitivity tools help to assess how likely results are robust to missing controls.
The robustness value (@analisereal,@chadhazlett) applies to multivar. regressions: It is the minimum strength of association that unobserved confounding would need to have, both with the treatment and with the outcome, to change the research conclusions.
The robustness value can be calculated with a Shiny Application (carloscinelli.shinyapps.io/robustness_val…) or with the #rstats package sensemakr.
Read 8 tweets
THREAD (1/10) in which I describe results of preliminary analyses of publicly available #COVID19 data from Singapore. Please interpret these cautiously, as the data are limited and there is no adjustment for confounding, etc.

First, an epidemic curve. No peak in cases yet.
(2/10) Next, sex distribution of cases. Males seem to be primarily affected, but these are early days, and emergence of cases in a cluster fashion could be skewing this. Male cases are younger than females (mean 40 vs. 45 years; p=0.164), but this isn't statistically significant.
(3/10) The age of cases has an approximately normal distribution. The mean age of cases is 42 years (standard deviation 14 years). Clearly, all age groups are at risk of infection.
Read 13 tweets
People seemed to be into the idea, so I am launching the Library of Statistical Techniques, or LOST. LOST is a Wiki guide to doing things in statistical software/code. Instructions, examples, and a little Rosetta stone btwn languages. github.com/NickCH-K/LOST/…
What's the point? (a) it's a way of providing more general guidance, in many languages at once, than StackExchange, (b) it makes it easy to link techniques to encourage best practices (i.e. the page about fixed effects can encourage, and link to, the page on clustering)
(c) when there are many different ways to do the same thing, allows for compare-and-contrast, or even savvy editors pointing towards a up-to-date "best" way, both difficult with Googling, and (d) offers a way to learn the material that's task-first.
Read 5 tweets
At #SDSS2019, I am chairing a session on workflows with @TiffanyTimbers @mikelove @stephaniehicks at 3:45 in Regency C - it is tucked away a bit in the corridor between AB and D
Read 55 tweets
Let's chat about building a R community within your office. I was the only R user in the office and I also wanted people I could go to for help and just thought partner to solve problems. So, here are some of my lessons learned from building a R culture in the office!
👇👇
📌Lesson 1: Don't tell or lecture about the benefits of #rstats, instead show them a demonstration!

People generally are motivated when they see how easy it is to start something small and with a specific example!

my ex: being able to work with multiple dataframes concurrently.
📌Lesson 2: Not every training has to carefully planned!

Sometimes the spontaneous help you offer to a colleague is still training. This training was timely, concise and helped them cross the roadblock.

Ex: I wrote down a quick #STATA to #R translation on a post-it note.
Read 11 tweets
#econtwitter: Want to produce event-study graph like this one, using estimators robust to heterogeneous treatment effects, across units or over time? You may want to check our new did_multipleGT #Stata package. "ssc install did_multipleGT" to install package and help file. 1/n
did_multipleGT can be used in DID designs with multiple groups and periods, where all units in same group and period have same treatment (sharp designs). E.g.: treatment is county- or state-level variable. Treatment does not have to be binary. 2/n
By default, did_multipleGT computes Wald-TC estimator of instantaneous treatment effect at the time when switchers switch introduced in Section 3.3 of papers.ssrn.com/sol3/papers.cf… 3/n
Read 11 tweets
1/ Easter, like many religious holidays, has been tied to peace & conflict.

We explored the link b/w religious holidays and violence in my Quantitative Security course.

👇is an Easter morning summary.
2/ There is great work exploring the link b/w religious beliefs and violence, such as this @Journal_IS piece by @monicaduffytoft

mitpressjournals.org/doi/abs/10.116…
3/ But a newer line of work directly explores how religious holidays alter patterns of violence.

Examples include Ron Hassner's @SecStudies_Jrnl piece exploring the relationship between "Sacred Time" and conflict initiation...

tandfonline.com/doi/abs/10.108…
Read 25 tweets
🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄

I’m feeling festive! I want to spread the cheer this holiday season by giving the #GiftOfCode for making beautiful figures! #EpiTwitter #StatsTwitter

🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅🎄🎅
When I was starting out, I remember how it would take HOURS to get my figures looking just right.

Nothing was more valuable than example code for learning different #DataViz options 🎁
First up:

These options in #stata for making this graph presentation-ready!

adjustrcspline, link(logit) scheme(vg_palec) ///
ylabel(, nogrid angle(horizontal)) ///
xtitle("X (Units)", size(medium)) ytitle("Outcome Risk (%)", size(medium)) ///
graphregion(fcolor(white))
Read 7 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!