Log inSign up
Lucy D’Agostino McGowan
751 posts
Image
user avatar
Lucy D’Agostino McGowan
@LucyStats
Biostatistician • Assistant Prof @WakeForestStats • Postdoc @jhubiostat • PhD @vandy_biostat • SoMe Associate Editor @AmjEpi 🎙 @casualinfer • @WomeninStat
lucymcgowan.com
Joined September 2013
310
Following
14.9K
Followers
  • Pinned
    user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Apr 26
    Please enjoy some of my finest work. In collaboration with my sister, Teesa D’Agostino, we bring you “I’m Just a Slope” a tribute to our love of statistics & The Lonely Island
    1K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Dec 1, 2023
    📣Our 🆕 paper Causal Inference is Not Just a Statistics Problem is out! @malco_barrett, @travisgerke, and I show that you can have 4 data sets with identical summary stats & visuals but very different data generating mechanisms-statistics alone can't tell you what to adjust for!
    Image
    Image
    Image
    220K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Feb 3, 2023
    🗣 Interested in conducting a sensitivity analysis for unmeasured confounding? It's easy! Here's a quick paper with several methods depending on your goals & what information you have available with real-data examples and {tipr} #rstats code link.springer.com/content/pdf/10…
    Image
    73K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Apr 24, 2023
    🎙️ On this weeks episode we talk about a “Causal Quartet” a set of four datasets generated under different mechanisms, all with the same statistical summaries (including visualizations!) but different true causal effects (Plus a chat about M-bias!)
    4 DAGS displaying a collider, confounder, mediator, and m-bias
    Four scatter plots for each of the four datasets plotting the exposure vs the outcome — the four look indistinguishable all with a slope of 1
    user avatar
    Casual Inference Podcast
    @casualinfer
    Apr 24, 2023
    M-Bias: Much Ado About Nothing? | Season 4 Episode 10 casualinfer.libsyn.com/m-bias-much-ad…
    105K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Jun 4, 2023
    📣 @malco_barrett, @travisgerke, and I have been working on some causal inference in #rstats projects (packages, workshops, and a new blog!) and have recently collected them all in a new website 👇
    Image
    69K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Apr 20, 2023
    📈 I taught neural networks this week, so BEHOLD, an ode to @daniela_witten in the form of a shiny application: "it's just a linear model" neural nets edition lucy.shinyapps.io/neural-net-lin… #rstats
    Image
    GIF
    68K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Apr 18, 2024
    Curious why statisticians recommend including the outcome in your imputation models? Check out our new paper in Statistical Methods in Medical Research! @SarahLotspeich, @StatStaci5, and I show with some simple mathematical derivations why this is really a requirement!
    Image
    51K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    May 1, 2023
    New post on imputation 👀 but first, a {mice} question: I've generated a very simple missing data problem (c ➡️ x + missingness) when I use the defaults the model post imputation is super biased! Only if I specify to fit a simple regression model does the imputation work...why?
    library(tidyverse)
library(broom)
suppressMessages(library(mice))
n <- 1000

set.seed(1)
data <- tibble(
  c = rnorm(n),
  x = c + rnorm(n),
  x_miss = rbinom(n, 1, 1 / (1 + exp(-(c)))),
  x_obs = ifelse(x_miss, NA, x),
  y = x + rnorm(n)
)

default_imp <- mice(data, print = FALSE, 
                    formulas = list(x_obs ~ c))
with(default_imp, lm(y ~ x_obs)) |>
  pool() |>
  tidy(conf.int = TRUE) |>
  filter(term == "x_obs") |>
  select(estimate, conf.low, conf.high)

lm_imp <- mice(data, print = FALSE,
                    method = "norm.predict", 
                    formulas = list(x_obs ~ c))
with(lm_imp, lm(y ~ x_obs)) |>
  pool() |>
  tidy(conf.int = TRUE) |>
  filter(term == "x_obs") |>
  select(estimate, conf.low, conf.high)
    71K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Mar 28, 2023
    🗣 Y'ALL I just learned that you can iterate through code highlighting in Quarto slides using a |, for example, if I want to first show lines 1-5, then 6, then the whole thing I would add this option: #| code-line-numbers: "1-5|6|" so much copy-paste time saved!
    Slide with the top 5 lines of code highlighted
    Slide with the 6th line of code highlighted
    Slide with all lines of code visible
    snippet of the .qmd file that makes this work: 

```{r}
#| code-line-numbers: "1-5|6|"
library(tidymodels)

rec <- recipe(
  HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur, 
  data = biomass) |>
  step_ns(carbon, hydrogen)
```
    23K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Jun 3, 2024
    Precision medicine at the very least means leaving continuous variables continuous
    Image
    GIF
    17K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Aug 9, 2023
    Interested in Visual Diagnostic Tools for Causal Inference? My #JSM2023 slides along with a short blog post with code can be found here: 🎞 docs.google.com/presentation/d… ✍️ r-causal.github.io/r-causal-blog/…
    Image
    18K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Dec 1, 2022
    Once again reminded that for some reason when we say "fixed effects" we all mean different things (cc: @andrewheiss)! Tag yourself, I think I'm 5?
    Image
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Oct 3, 2023
    My dear grandfather peacefully passed away last week — we already miss him so much, but I am so grateful to have this conversation with him from a few years ago recorded on @casualinfer @EpiEllie & I re-released it in his memory this week ♥️ casualinfer.libsyn.com/remembering-ra…
    14K
  • user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    May 18, 2024
    One of the most common questions I get when talking about why you need to include the outcome in your imputation model is whether this is “double dipping” or “data leakage” — if this is you, what would convince you that this is not a concern?
    user avatar
    Lucy D’Agostino McGowan
    @LucyStats
    Apr 18, 2024
    Curious why statisticians recommend including the outcome in your imputation models? Check out our new paper in Statistical Methods in Medical Research! @SarahLotspeich, @StatStaci5, and I show with some simple mathematical derivations why this is really a requirement!
    Image
    20K

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

Terms of Service|Privacy Policy|Cookie Policy|Accessibility|Ads info|© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up
Advertisement
Advertisement