Skip to content

Instantly share code, notes, and snippets.

@iangow
Created September 19, 2024 07:41
Show Gist options
  • Save iangow/2cb25235006a6eea89d297a3128f977c to your computer and use it in GitHub Desktop.
Save iangow/2cb25235006a6eea89d297a3128f977c to your computer and use it in GitHub Desktop.
Code to produce AUC stats from Walker's data
library(farr)
library(tidyverse)
original <- read_csv("~/Downloads/WalkerDataCodeMar2021/original.csv")
original |>
group_by(fyear) |>
summarize(auc = auc(prob, aaer), .groups = "drop") |>
mutate(avg_auc = mean(auc))
recode <- read_csv("~/Downloads/WalkerDataCodeMar2021/recode.csv")
recode |>
group_by(fyear) |>
summarize(auc = auc(prob, aaer), .groups = "drop") |>
mutate(avg_auc = mean(auc))
rerun <- read_csv("~/Downloads/WalkerDataCodeMar2021/rerun.csv")
rerun |>
group_by(fyear) |>
summarize(auc = auc(prob, aaer), .groups = "drop") |>
mutate(avg_auc = mean(auc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment