Better testing

This commit is contained in:
Daniel Winkler 2025-09-12 16:06:14 +10:00
commit 5160c403b5
2 changed files with 22 additions and 0 deletions

View file

@ -6,6 +6,7 @@ on:
- 'flake.lock'
- 'versions/*.json'
- '.github/workflows/*.yml'
- 'test/*.R'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

View file

@ -1,14 +1,35 @@
cat("Testing\n")
cat("\n============================================================ fwildclusterboot ============================================================\n")
library(fwildclusterboot)
data(voters)
lm_fit <- lm(
proposition_vote ~ treatment + ideology1 + log_income + Q1_immigration ,
data = voters
)
boot_lm <- boottest(
lm_fit,
clustid = "group_id1",
param = "treatment",
B = 999
)
summary(boot_lm)
cat("\n============================================================ httpgd ============================================================\n")
library(httpgd)
hgd()
cat("\n============================================================ musicMetadata ============================================================\n")
library(musicMetadata)
print(classify_labels('Interscope'))
cat("\n============================================================ nvimcom ============================================================\n")
library(nvimcom)
cat("\n============================================================ synthdid ============================================================\n")
library(synthdid)
data('california_prop99')
setup = panel.matrices(california_prop99)
tau.hat = synthdid_estimate(setup$Y, setup$N0, setup$T0)
se = sqrt(vcov(tau.hat, method='placebo'))
sprintf('95%% CI (%1.2f, %1.2f)', tau.hat - 1.96 * se, tau.hat + 1.96 * se)
cat("\n============================================================ END ============================================================\n")