andrew, (edited ) to random
@andrew@fediscience.org avatar

New blog post! Seven (7!) new tidyexplain-esque animations showing how {dplyr}'s mutate(), summarize(), group_by(), and ungroup() all work together https://www.andrewheiss.com/blog/2024/04/04/group_by-summarize-ungroup-animations/

andrew, to random
@andrew@fediscience.org avatar

New blog post! Have you (like me!) wondered what the ATT means in causal inference and how it's different from average treatment effects (ATE)? I use to explore why we care about the ATE, ATT, and ATU and show how to calculate them with observational data! https://www.andrewheiss.com/blog/2024/03/21/demystifying-ate-att-atu/

Before we calculate these different treatment effects with the realized outcomes instead of the hypothetical potential outcomes, let’s look really quick at the practical difference between the true ATE, ATT, and ATU. All three estimands are useful for policymaking! The ATE is −15, implying that mosquito nets cause a 15 point reduction in malaria risk for every person in the country. This includes people who live at high elevations where mosquitoes don’t live, people who live near mosquito-infested swamps, people who are rich enough to buy Bill Gates’s mosquito laser, and people who can’t afford a net but would really like to use one. If we worked in the Ministry of Health and wanted to know if we should make a new national program that gave everyone a free bed net, the overall reduction in risk is −15, which is probably pretty good! The ATT is −16.29, which is bigger than the ATE. The effect of net usage is bigger for people who are already using the nets. This is because of underlying systematic reasons, or selection bias. Those using nets want to use them because they need them more or can access them more easily—they might live in areas more prone to mosquitoes, or they can afford to buy their own nets, or something else. They know themselves and understand some notion of their personal individual causal effect and seek out nets. If we removed access to their nets, it would have a strong effect. …
Mirrored histogram showing “weird” parts of the population: treated people who were unlikely to be treated, and untreated people who were likely to be treated
Mirrored histogram showing pseudo-populations of treated and untreated people that have been reweighted to be more comparable and unconfounded

andrew, to random
@andrew@fediscience.org avatar

This paper by @nickchk (https://doi.org/10.1080/1350178X.2022.2088085 ; ungated here: https: //ftp.cs.ucla.edu/pub/stat_ser/huntington-klein-jem-june2022.pdf) is the best, most accessible introduction and explanation of how DAGs can be useful for causal inference for people more familiar with potential outcomes and econometrics-style approaches

andrew, to random
@andrew@fediscience.org avatar
andrew,
@andrew@fediscience.org avatar
andrew, to random
@andrew@fediscience.org avatar

yessssss this brms bayesian model for a conjoint survey experiment took 3 hours to fit, estimated nearly 40,000 unique parameters, takes up 4 GB of space, and is most definitely way overkill, but IT CONVERGED AND WORKS GLORIOUSLY

Console output showing that the MCMC draws took 180 minutes to run
R console output showing that the model has 39,944 separate parameters
The saved rds file for the model clocking in at 4.2 GB

andrew, to random
@andrew@fediscience.org avatar

Also, in the course of adding DOIs to past posts, I updated my big ol' guide to different flavors of marginal effects to use {marginaleffects}'s newer slopes(), predictions(), and comparisons() functions https://www.andrewheiss.com/blog/2022/05/20/marginalia/

Image visualizing different ways of calculating marginal effects

andrew, to random
@andrew@fediscience.org avatar

Q about stuff: I'm finding the probability of direction (proportion of posterior that's >0 or <0), but I never know how to report these, since sometimes they're positive and sometimes they're negative. My current solution is to use a column for each direction—is there a better way tho?

andrew, to random
@andrew@fediscience.org avatar

Check out this new ultimate guide to multilevel/hierarchical multinomial conjoint analysis with and {brms}, including how to find both marketing-style predicted market shares and polisci-style causal effects across individual covariates

https://www.andrewheiss.com/blog/2023/08/12/conjoint-multilevel-multinomial-guide/

Posterior distribution of marginal means for possible seat counts, split by whether respondents carpool or not
Huge formal specification of a multilevel model with choice-level and individual-level characteristics
Example conjoint question

andrew, to random
@andrew@fediscience.org avatar
andrew, to random
@andrew@fediscience.org avatar
andrew, to random
@andrew@fediscience.org avatar

Here it is! The ultimate practical guide to Bayesian and frequentist conjoint data analysis with and {brms} and {marginaleffects}, including how to distinguish between marginal effects and marginal means + work with subgroups! https://www.andrewheiss.com/blog/2023/07/25/conjoint-bayesian-frequentist-guide/

AMCEs and marginal means and differences in marginal means
Two posterior distributions of causal estimates and the probabilities that they're less than zero
An example conjoint survey question

andrew, to random
@andrew@fediscience.org avatar

throwing some do() operators into this conjoint blog post so you know it's serious causal inference

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • osvaldo12
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • Durango
  • anitta
  • InstantRegret
  • GTA5RPClips
  • cubers
  • ethstaker
  • normalnudes
  • tacticalgear
  • cisconetworking
  • tester
  • Leos
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines