Gabe Loewinger's Avatar

Gabe Loewinger

@gabeloewinger.bsky.social

Machine learning research scientist @ NIMH interested in statistics, optimization, ML, neuroscience, Brazilian jiu-jitsu, cats.

93 Followers  |  165 Following  |  24 Posts  |  Joined: 13.03.2024  |  1.972

Latest posts by gabeloewinger.bsky.social on Bluesky

In fact, we propose analyses to probe the causal effect of treatment on expectancy/belief/blinding integrity in the MSM/sequentially randomized design manuscript section (e.g., testing how expectancy changes over time in response to different treatment sequences).

26.01.2026 17:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Thanks for your question! Our warning against conditioning on post-treatment belief does *not* extend to cautioning against testing blinding success. Testing for causal effects of experimentally manipulated variables (e.g., treatment) on outcomes like blinding/belief/expectancy is totally valid.

26.01.2026 17:32 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Why This Matters:
β€’ For advocates & those skeptical of psychedelics' benefits, this provides a framework to quantify drug effects + expectancy contributions
β€’ Brings rigorous analytical tools to complement existing study design solutions
β€’ Applicable to other functionally unmasked interventions

09.12.2025 17:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

β€’ CDEs can be estimated from existing trial data if the right variables are measured
β€’ We use modern semiparametric estimation methods that can incorporate flexible machine learning
β€’ We propose sequentially randomized designs to probe the durability of effects of the treatment and expectancy

09.12.2025 17:41 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

We propose to address functional unmasking by quantifying treatment effects at fixed expectancy levels
β€’ We specifically target controlled direct effect (CDE) causal mediation quantities
β€’ We propose both experimental and observational causal inference approaches

09.12.2025 17:41 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

It is natural to try to statistically adjust for unmasking w/regression or stratifying

But post-treatment variables require careful analytical handling: intuitive approaches like stratifying results on perceived treatment can make even beneficial interventions appear harmful due to collider bias!

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

Key insight: Unmasking isn't about confounding, it's about mediation through expectancy 🧠

Even "successfully masked" studies can yield misleading results if post-treatment expectancy levels differ across arms

So how do we address unmasking?

09.12.2025 17:41 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Causal Inference in Studies with Functional Unmasking: Psychedelics and Beyond In clinical trials for mental health treatments, functional unmasking (unblinding) is a widespread challenge wherein participants become aware of their assigned treatment. Unmasking is especially conc...

Our team of statisticians and psychedelic researchers (@awlevis.bsky.social, Mats Stensrud + Sandeep Nayak & David Yaden of @jhpsychedelics.bsky.social) developed a causal inference framework for functional unmasking in psychedelic RCTs.

See our pre-print + analysis guide/code:
tinyurl.com/yhwez25p

09.12.2025 17:41 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 2

The FDA's MDMA decision exposed a major challenge in psychedelic research: participants know when they got the real drug (hard to miss the "trip"). So how do we interpret results from psychedelic RCTs?

Do benefits come from the compound itself or heightened expectancies about symptom improvement?

09.12.2025 17:41 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

Thank you! Great question-nesting neurons in subjects does seem natural (esp if you want interpretation of animal population as opposed to neuron population). I've found FLMM is way better for finding subpopulations than e.g. clustering raw traces. I've done methods work on this. Happy to discuss!

20.03.2025 12:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@franciscopereira.bsky.social

18.03.2025 22:09 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
A statistical framework for analysis of trial-level temporal dynamics in fiber photometry experiments A fiber photometry analysis framework based on functional mixed models enhances the detection of effects by testing signal-variable associations at each trial timepoint and accounting for between-anim...

β€’ We release R+Python packages and user guides. The methods can be applied to other neural data types too!
β€’ Paper: elifesciences.org/articles/95802
β€’ Code and user guides: github.com/gloewing/pho... 13/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

FLMM finds effects obscured by standard analyses! For example, FLMM reveals effects that β€œwash out” when analyzed with AUCs. In published work, Cue Period AUC finds no effects because it averages over time-windows (1) and (2) that have opposing effects. 12/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

FLMM can disentangle components with distinct temporal dynamics. It can also be used to run analogues of standard hypothesis tests (e.g., ANOVAs, correlations) at each trial timepoint. Below is an example akin to the FLMM version of a paired t-test. 11/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Informally, functional random-effects allow one to model variability across animals in the signal β€œshape.” 10/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Functional random-effects allow one to model how the dynamics of signal-covariate associations vary across animals. 9/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

FLMM plots can be conceptualized as pooling signal values (dF/F) at a given trial time-point (e.g., 1.7 sec) across animals and trials, correlating it with covariate(s) (e.g., Latency-to-press) and plotting the slope of the correlation. 8/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

FLMM outputs a coefficient estimate plot that shows how the signal– covariate association evolves across trial timepoints. 7/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

FLMMs exploit autocorrelation to construct *joint* 95% CIs (light grey) that show time windows where effects are statistically significant (any intervals that do not contain 0). All you need to do is visually inspect! 6/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

FLMM combines the benefits of 1) Mixed Models to account for between-animal heterogeneity, and 2) Functional Regression to model effects at each trial timepoint. 5/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Solution: We propose an analysis framework based on Functional Linear Mixed Models (FLMM) that allows one to analyze signal–covariate associations at every trial timepoint. 4/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Problem: Photometry is often applied in nested longitudinal experiments with multiple trials per session and sessions per animal. This induces correlation, missing data, etc., that can obscure effects if not accounted for statistically. 3/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Problem: Common photometry analysis methods reduce detection of effects because, among other things, they average across trials and use summary statistics (e.g., AUC, peak amplitude). 2/13

18.03.2025 22:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Test effects of behavior/events at every trial timepoint in photometry analyses! Paper with Erjia Cui, Dave Lovinger, Francisco Pereira. β€œA Statistical Framework for Analysis of Trial-Level Temporal Dynamics in Fiber Photometry Experiments.” Python+R packages! elifesciences.org/articles/95802. 1/13

18.03.2025 22:04 β€” πŸ‘ 28    πŸ” 8    πŸ’¬ 4    πŸ“Œ 2

@gabeloewinger is following 20 prominent accounts