## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

## -----------------------------------------------------------------------------
library(falsifyr)

fragile_fit <- lm(score ~ treatment + age + baseline_score, data = fragile_trial)
resilient_fit <- lm(score ~ treatment + age + baseline_score, data = resilient_trial)

fragile <- attack(
  fragile_fit,
  term = "treatment",
  attacks = "row_deletion",
  intensity = "fast",
  seed = 1
)
resilient <- attack(
  resilient_fit,
  term = "treatment",
  attacks = "row_deletion",
  intensity = "fast",
  seed = 1
)

data.frame(
  dataset = c("fragile_trial", "resilient_trial"),
  score = c(fragile$survival_score, resilient$survival_score),
  verdict = c(fragile$verdict, resilient$verdict)
)

