Quick @Stata tip: use the "coeflegend" option in a regression to display the name Stata uses for each coefficient.
reg price mpg i.foreign##i.rep78, coeflegend
@toddrjones.bsky.social
Economics professor, Mississippi State University, CESifo, IZA | Applied micro, econ of ed, data viz, coding tips | Latter-day Saint | Dad x 4. toddrjones.com
Quick @Stata tip: use the "coeflegend" option in a regression to display the name Stata uses for each coefficient.
reg price mpg i.foreign##i.rep78, coeflegend
The changing relationship between Democratic vote share and
1) the percentage of county with at least a Bachelor's degree
2) median income of county.
See also: www.nytimes.com/interactive/...
23.06.2025 21:28 β π 3 π 0 π¬ 0 π 0Over the past couple decades, Democratic support has grown in more college-educated and higher-income counties, a shift away from its traditional blue-collar strongholds. h/t βͺ@shanegoldmacher.bsky.socialβ¬
23.06.2025 21:28 β π 3 π 0 π¬ 1 π 0The relationship between a countyβs Democratic vote share (in the 2024 election) and its share of college-educated residents.
31.05.2025 19:50 β π 6 π 0 π¬ 0 π 0Percent (age 25+) with a Ph.D.
On a personal note, I have lived in two of the top 25 (#3 Tompkins County, NY and now #22 Oktibbeha County, MS).
Top 5: 1. Los Alamos, NM (18%); 2. Lexington City, VA (12%); 3. Tompkins County, NY (12%); 4. Orange County, NC (9%); 5. Charlottesville city, VA (8%).
Our baby boy is here! That makes four kids under six - wish us luck!
29.05.2025 18:41 β π 8 π 0 π¬ 0 π 0Falling fertility.
19.05.2025 14:44 β π 3 π 2 π¬ 0 π 0Here are some ways the world has gotten better.
18.05.2025 20:55 β π 641 π 216 π¬ 17 π 19When in the day are babies born?
16.05.2025 16:28 β π 11 π 3 π¬ 0 π 0Number of births per day, 1994-2014.
15.05.2025 20:58 β π 4 π 0 π¬ 0 π 0Average number of US births by day of the year.
15.05.2025 20:03 β π 4 π 0 π¬ 0 π 0Average number of births by day of the week.
15.05.2025 02:52 β π 6 π 1 π¬ 0 π 0That was unexpected - Elon Musk retweeted my graph.
11.05.2025 19:08 β π 4 π 0 π¬ 0 π 0There were more Latter-day Saint convert baptisms last year than any year since 1997.
06.05.2025 03:56 β π 5 π 0 π¬ 1 π 0What is your top book recommendation?
02.05.2025 01:16 β π 2 π 0 π¬ 3 π 0I've added 43 new tips to my book, bringing the total to 140.
You can download "Quick Stata Tips" and the accompanying .do file for free at toddrjones.com/quickstatati....
Good catch - thanks!
16.04.2025 21:02 β π 0 π 0 π¬ 0 π 0I've added 43 new tips to my book, bringing the total to 140.
You can download "Quick Stata Tips" and the accompanying .do file for free at toddrjones.com/quickstatati....
Death rate per 100k by selected causes, ages 0-84.
26.03.2025 13:40 β π 1 π 0 π¬ 0 π 0Death rate per 100k by selected causes, ages 0-39.
26.03.2025 13:40 β π 4 π 0 π¬ 1 π 1Deaths and death rate/100,000, by age.
26.03.2025 03:14 β π 3 π 1 π¬ 0 π 0Leading Cause of Death by Age.
24.03.2025 22:50 β π 5 π 0 π¬ 0 π 0Mississippi State Univ. is hiring a tenure-track Econ Assistant Prof w/ August start!
Open field; pref. for applied micro & teaching PhD Micro I & II (Micro II this fall).
Apply: MSU site & www.aeaweb.org/joe/listing.php?JOE_ID=2025-01_111475768
Please repostβit's an off-cycle search. Thanks!
Looks good - thanks!
16.03.2025 19:48 β π 1 π 0 π¬ 0 π 0Thanks.
15.03.2025 23:45 β π 0 π 0 π¬ 1 π 0Of course, in this example, we didn't need to use ChatGPT. But imagine examples where the contents of the pages differ enough that it isn't feasible to use traditional webscraping tools. Or we need the LLM to process the data somehow.
Note also that ChatGPT can help write the R code.
To programmatically use ChatGPT in R to automate repeated tasks, e.g., scraping:
1. Get OpenAI API key & add $ to account
2. In R, for each page:
3. Get the page's text
4. Call ChatGPT to process the text, returning result in JSON
5. Convert JSON to dataframe
See screenshots for an example. (1/2)
Thank you, Sarah!
12.03.2025 14:10 β π 1 π 0 π¬ 0 π 0Thanks!
12.03.2025 14:10 β π 1 π 0 π¬ 0 π 0