Fabio Martinenghi 's Avatar

Fabio Martinenghi

@fabitmart.bsky.social

Applied Economist. Research Fellow at University of Newcastle, Australia. Health, Law & Econ, Education. Passionate applied econometrics. #econsky

392 Followers  |  737 Following  |  106 Posts  |  Joined: 01.08.2023  |  2.0535

Latest posts by fabitmart.bsky.social on Bluesky

Lol I love this hot take. On point.

05.08.2025 12:12 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Highly relevant to anybody working with regression discontinuity designs

03.08.2025 21:40 β€” πŸ‘ 11    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0

Georgia Papadogeorgou, Zhaoyan Song, Guido Imbens, Fabrizia Mealli: Causal Inference when Intervention Units and Outcome Units Differ https://arxiv.org/abs/2507.20231 https://arxiv.org/pdf/2507.20231 https://arxiv.org/html/2507.20231

29.07.2025 06:53 β€” πŸ‘ 3    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0

How insane is it that openai asks for BIOMETRIC information for using its API with the o3 model?! Asking me to take a selfie and upload personal documents. Anthropic, here I come #dataskyence

28.07.2025 05:22 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Yes please!

28.07.2025 01:13 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Something you might find helpful is ggview::canvas() for setting the in RStudio viewing pane to be in the proportions you intend to export in. So it should look the same as a saved figure.

25.07.2025 09:48 β€” πŸ‘ 27    πŸ” 3    πŸ’¬ 5    πŸ“Œ 1

A little while ago I saw a really beautiful colour palette/colour science post. It was something to do with capturing pastel/water colours and transformations to the colourspace. I can't for the life of me remember what is was called, does anyone remember this? #rstats

23.07.2025 08:20 β€” πŸ‘ 8    πŸ” 9    πŸ’¬ 2    πŸ“Œ 0

Revising my survey and experiments grad course and looking for examples of papers that do a good job of (really) integrating observational and experimental data. Suggestions? Self-reference welcome.

21.07.2025 21:50 β€” πŸ‘ 15    πŸ” 7    πŸ’¬ 8    πŸ“Œ 0

Very very interesting and looking forward to reading it in full

23.07.2025 01:46 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Chapter 6 Nonparametric regression | Notes for Predictive Modeling <p>Notes for Predictive Modeling. MSc in Big Data Analytics. Carlos III University of Madrid.</p>

These course notes on nonparametric regression (including kernel density estimation) by Eduardo GarcΓ­a PortuguΓ©s are *fantastic*. So clear, with great visuals and clear code.

22.07.2025 21:10 β€” πŸ‘ 54    πŸ” 6    πŸ’¬ 5    πŸ“Œ 0

This goes in the right direction but I guess I'm wondering what is the best practice for implement something like this in latex

18.07.2025 07:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I'm talking about several things at once. The mechanical way of placing figures is maybe easier to figure out. But how to do it in a way that is aesthetically pleasing, like a professional magazine editor would it, is less easy. It's an overlooked aspect of data viz

18.07.2025 02:11 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

#rstats and TeX friends: what are your best takes on how to nicely size and place figures in academic articles? I spend time curating my #dataviz but then I default to big page-wide plots that end up automatically at the bottom of the document. Any tips/resources?
#latex

18.07.2025 01:35 β€” πŸ‘ 7    πŸ” 2    πŸ’¬ 1    πŸ“Œ 1

the standard greeting among statisticians is "good norming"

14.07.2025 16:05 β€” πŸ‘ 16    πŸ” 5    πŸ’¬ 1    πŸ“Œ 0
Screenshot of a connection to a DuckDB database, and a screenshot of the columns of one of the tables in that database

Screenshot of a connection to a DuckDB database, and a screenshot of the columns of one of the tables in that database

Table of contents for the post:

- DuckDB, {DBI}, and the difficulty of discerning data in a database
- DuckDB, {connections}, and the magical Connections Pane
- Bonus: Better support for DuckDB in the Connections Pane
- The whole game

Table of contents for the post: - DuckDB, {DBI}, and the difficulty of discerning data in a database - DuckDB, {connections}, and the magical Connections Pane - Bonus: Better support for DuckDB in the Connections Pane - The whole game

R code for connecting to a database, adding stuff to it, extracting it, and plotting it

library(tidyverse)

# Use nicer DuckDB Connections Pane features
options("duckdb.enable_rstudio_connection_pane" = TRUE)

# Connect to an in-memory database, just for illustration
con <- connections::connection_open(duckdb::duckdb(), ":memory:")

# Add stuff to it
copy_to(
  con,
  gapminder::gapminder,
  name = "gapminder",
  overwrite = TRUE,
  temporary = FALSE
)

# Get stuff out of it
gapminder_2007 <- tbl(con, I("gapminder")) |>
  filter(year == 2007) |>
  collect()

# All done
connections::connection_close(con)

# Make a pretty plot, just for fun
ggplot(gapminder_2007, aes(x = gdpPercap, y = lifeExp)) +
  geom_point(aes(color = continent)) +
  scale_x_log10(labels = scales::label_dollar(accuracy = 1)) +
  scale_color_brewer(palette = "Set1") +
  labs(
    x = "GDP per capita",
    y = "Life expectancy",
    color = NULL,
    title = "This data came from a DuckDB database!"
  ) +
  theme_minimal(base_family = "Roboto Condensed")

R code for connecting to a database, adding stuff to it, extracting it, and plotting it library(tidyverse) # Use nicer DuckDB Connections Pane features options("duckdb.enable_rstudio_connection_pane" = TRUE) # Connect to an in-memory database, just for illustration con <- connections::connection_open(duckdb::duckdb(), ":memory:") # Add stuff to it copy_to( con, gapminder::gapminder, name = "gapminder", overwrite = TRUE, temporary = FALSE ) # Get stuff out of it gapminder_2007 <- tbl(con, I("gapminder")) |> filter(year == 2007) |> collect() # All done connections::connection_close(con) # Make a pretty plot, just for fun ggplot(gapminder_2007, aes(x = gdpPercap, y = lifeExp)) + geom_point(aes(color = continent)) + scale_x_log10(labels = scales::label_dollar(accuracy = 1)) + scale_color_brewer(palette = "Set1") + labs( x = "GDP per capita", y = "Life expectancy", color = NULL, title = "This data came from a DuckDB database!" ) + theme_minimal(base_family = "Roboto Condensed")

Scatterplot showing global health and wealth from gapminder in 2007

Scatterplot showing global health and wealth from gapminder in 2007

Another @posit.co Positron blog post! To make it easier to work with some huge data in one of my projects, I've loaded it into @duckdb.org. The Connections Pane makes it really easy and convenient to connect to and explore databases with #rstats. Here's how: www.andrewheiss.com/blog/2025/07...

10.07.2025 18:19 β€” πŸ‘ 84    πŸ” 20    πŸ’¬ 2    πŸ“Œ 0
People often say their goal is to identify β€œrisk factors”. But what does that mean? Some people use the term to indicate potential causes of outcomes. Then just say cause. Others use it to identify predictors of outcomes. Then just say predict. And, sadly, too many others use it as shorthand for factors that are β€œstatistically associated” with outcomes. In this case, say nothing at all, since this β€œgoal” has no clinical utility whatsoever (beyond what it might suggest about causation or prediction). So once you have framed your research question as description, prediction, causation or measurement, there is no longer a need to talk about risk factors. It's basically just a catch-all phrase to cover up muddy thinking.

People often say their goal is to identify β€œrisk factors”. But what does that mean? Some people use the term to indicate potential causes of outcomes. Then just say cause. Others use it to identify predictors of outcomes. Then just say predict. And, sadly, too many others use it as shorthand for factors that are β€œstatistically associated” with outcomes. In this case, say nothing at all, since this β€œgoal” has no clinical utility whatsoever (beyond what it might suggest about causation or prediction). So once you have framed your research question as description, prediction, causation or measurement, there is no longer a need to talk about risk factors. It's basically just a catch-all phrase to cover up muddy thinking.

Relevant:

(from statsepi.substack.com/p/sorry-what... ICYMI)

04.07.2025 14:14 β€” πŸ‘ 30    πŸ” 8    πŸ’¬ 2    πŸ“Œ 0
Preview
GitHub - andrewheiss/positron-docker Contribute to andrewheiss/positron-docker development by creating an account on GitHub.

It includes an example Docker Compose project to follow along with github.com/andrewheiss/...

05.07.2025 17:20 β€” πŸ‘ 10    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
Simultaneous confidence bands: Theory, implementation, and an application to SVARs Simultaneous confidence bands are versatile tools for visualizing estimation uncertainty for parameter vectors, such as impulse response functions. In linear models, it is known that that the sup-t c...

Randomly obsessed with simultaneous (uniform) inference. Feel free to ask about it. A mini thread on this follows. 🧡

Recommended reading:

#statssky #econsky #episky

03.07.2025 21:20 β€” πŸ‘ 44    πŸ” 11    πŸ’¬ 1    πŸ“Œ 2

Thanks, I appreciate it!

02.07.2025 21:41 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

If I wanted to do a tour de force on the demography of fertility, is there a set of sources you would suggest? Can include textbook treatments of the topic. I'm thinking core concepts plus recent work. Only topic I have ever read about is first and second demographic transition

30.06.2025 04:42 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

"risk". So many crimes are committed in its name

27.06.2025 10:14 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

#rstats Laurent recently shared a demo of 'sircon' (his new R console written from the ground up in C++) with me and I was blown away.

Think of it as a better 'radian'; faster, more features and without all of the dependency cruft (🐍). Just waiting on the Unix version now...

20.06.2025 14:43 β€” πŸ‘ 16    πŸ” 5    πŸ’¬ 2    πŸ“Œ 0

data viz friends: anyone got good references on choosing colour schemes for plots, especially taking into account accessibility? (i.e. how to be colour-blind-friendly)

25.06.2025 03:50 β€” πŸ‘ 8    πŸ” 4    πŸ’¬ 9    πŸ“Œ 0

This is a really good list of #DataViz resources! πŸ“Š

22.06.2025 19:16 β€” πŸ‘ 38    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0

Menswear bluesky meets traditional urbanism bluesky @createstreets.bsky.social

22.06.2025 23:16 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Where can I learn more about this?

17.06.2025 22:59 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Illuminating the process of producing rigorous science by selecting on the dependent variable

16.06.2025 21:26 β€” πŸ‘ 15    πŸ” 5    πŸ’¬ 0    πŸ“Œ 0

Lovely, that's what I've been looking for as well. Journal guidelines are vague and then you look at published papers and most are alphabetical. Thank you

09.05.2025 09:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

This is very reassuring. "
We recommend that journals require authors to state in the opening footnote how author
order was determined but leave the choice of the principle governing the ordering (e.g.,
alphabetical, by contribution, random, or otherwise) to the authors."

09.05.2025 08:22 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Default is alphabetical, with some allowing random order. Am I missing something? Not sure which ones allow to specify the order

09.05.2025 08:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@fabitmart is following 20 prominent accounts