mirror of
https://github.com/dwinkler1/fran.git
synced 2026-02-19 14:40:58 -05:00
Better testing
This commit is contained in:
parent
07623baadb
commit
5160c403b5
2 changed files with 22 additions and 0 deletions
1
.github/workflows/check.yml
vendored
1
.github/workflows/check.yml
vendored
|
|
@ -6,6 +6,7 @@ on:
|
|||
- 'flake.lock'
|
||||
- 'versions/*.json'
|
||||
- '.github/workflows/*.yml'
|
||||
- 'test/*.R'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
|
|
|||
21
test/test.R
21
test/test.R
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue