@andrew@fediscience.org
@andrew@fediscience.org avatar

andrew

@andrew@fediscience.org

Assistant professor at Georgia State University. 6 kids. Study NGOs, human rights, #PublicPolicy #PublicAdmin, #Nonprofits, #CausalInference.

#rstats forever.

Other communities: #PolisciTwitter, #EconTwitter, #AcademicTwitter, #Statsodon

This profile is from a federated server and may be incomplete. Browse more on the original instance.

andrew, to random
@andrew@fediscience.org avatar

5 of 5 stars to The Sound of a Wild Snail Eating by Elisabeth Tova Bailey https://www.goodreads.com/review/show/6412065086?utm_medium=api&utm_source=rss

andrew, to random
@andrew@fediscience.org avatar

5 of 5 stars to God's Ghostwriters: Enslaved Christians and the Making of the Bible by Candida Moss https://www.goodreads.com/review/show/6407720834?utm_medium=api&utm_source=rss

andrew, to random
@andrew@fediscience.org avatar

5 of 5 stars to Network Effect (The Murderbot Diaries, #5) by Martha Wells https://www.goodreads.com/review/show/6404452189?utm_medium=api&utm_source=rss

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,
@andrew@fediscience.org avatar
andrew, to random
@andrew@fediscience.org avatar

After years of wishing something like this existed, I decided to finally buckle down and make it myself. Behold, an animated explanation of what group_by() |> summarize() does in {dplyr} in !

More coming later with group_by(cat2), plus group_by(cat1, cat2) and ungroup()!

https://youtu.be/MJDJ8YDmHdQ

andrew,
@andrew@fediscience.org avatar

@EvaMaeRey Ah good call! I just switched them to j and k

andrew,
@andrew@fediscience.org avatar

@EvaMaeRey Yeah, this is part 2, with group_by(cat2). I’m also making one with both cat1 and cat2

andrew,
@andrew@fediscience.org avatar

And here's an example of grouping by cat2 instead! #rstats https://www.youtube.com/watch?v=fHc2kuB6aVE

andrew,
@andrew@fediscience.org avatar
andrew,
@andrew@fediscience.org avatar

@grrrck I forked tidyexplain and was going to try doing this with gganimate, but it was too hard since there are so many different steps and it's not just toggling between two dataframes

But I copied the fonts/colors/animation timing so it fits with your other ones so maybe it could address this someday https://github.com/gadenbuie/tidyexplain/issues/31

andrew,
@andrew@fediscience.org avatar

@grrrck I'm doing it all by hand in Illustrator and After Effects

I'll add a PR with YouTube and/or Vimeo links + animated gifs + raw mp4s + whatever format you need once I finish the group_by(cat1, cat2) %>% summarize() %>% ungroup() animation

andrew,
@andrew@fediscience.org avatar

And the mega one! group_by() with multiple groups, summarize(), and ungroup()! https://youtu.be/JUvh1AzVsxI
#rstats

andrew,
@andrew@fediscience.org avatar

@hadleywickham Thanks!!

andrew,
@andrew@fediscience.org avatar

@minecr Ooh this was a good suggestion! I ended up making one that just shows group_by and ungroup to show that the order stays how it is in the original data https://www.andrewheiss.com/blog/2024/04/04/group_by-summarize-ungroup-animations/#grouping-and-ungrouping-with-group_by-and-ungroup

andrew, to random
@andrew@fediscience.org avatar

4 of 5 stars to We Keep the Dead Close: A Murder at Harvard and a Half Century of Silence by Becky Cooper https://www.goodreads.com/review/show/6390182437?utm_medium=api&utm_source=rss

andrew, to random
@andrew@fediscience.org avatar

Happy Easter!

andrew, to random
@andrew@fediscience.org avatar

4 of 5 stars to The Science of Sci-Fi: From Warp Speed to Interstellar Travel by Erin Macdonald https://www.goodreads.com/review/show/6377215771?utm_medium=api&utm_source=rss

andrew, to random
@andrew@fediscience.org avatar

Revisiting #rstats code from a project I started 6 years ago and I'm delighted with Past Me bc I spent time back then making sure it was all reproducible and it still works just fine now†!

Good coding practices are good.

———
† Only a few minor tweaks needed to fix some tidyverse deprecation warnings

andrew, to random
@andrew@fediscience.org avatar

4 of 5 stars to A Wizard of Earthsea (Earthsea Cycle, #1) by Ursula K. Le Guin https://www.goodreads.com/review/show/6367905110?utm_medium=api&utm_source=rss

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
andrew, to random
@andrew@fediscience.org avatar
zoowalk, to vscode
@zoowalk@mastodon.social avatar

Q for #rstats #quarto users in #vscode - am I right that there is no way to see the final appearance of a plot other than rendering the document? There is no preview - other than in rstudio - which gives an accurate representation? The vsc plot window follows its own dimension (distorts proportions).

Love vs code but re-rendering the whole doc for each plot iteration feels quite cumbersome. Tagging the mighty @andrew since I think there was a related discussion on GH which I can't find..🙏🙏👏👏

andrew,
@andrew@fediscience.org avatar

@zoowalk Yeah, that's true (see this issue here https://github.com/quarto-dev/quarto/issues/287) - R has no consistent way to send figure dimensions to VS Code

andrew, to random
@andrew@fediscience.org avatar

{gt} makes beautiful tables, exhibit no. 943

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