Skip to content

Commit

Permalink
Adding CODECOV token to GA
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed May 29, 2024
1 parent b3ade3b commit 14b6707
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/R_CMD_check_Hades.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
CDM5_ORACLE_CDM_SCHEMA: ${{ secrets.CDM5_ORACLE_CDM_SCHEMA }}
Expand Down
25 changes: 25 additions & 0 deletions extras/InvestigatingSingleBiasMetric.R
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,28 @@ fun <- function(x, ncs) {
x <- seq(0, 1, length.out = 100)
plot(x, -fun(x, ncs = ncs))
nlm(fun, 0.6, ncs = ncs)$estimate

# Possible threshold values ------------------------------------------------------------------------
mu <- 0.0
sigma <- 0.313

fun <- function(x, mu, sigma) {
return(abs(x) * dnorm(x, mu, sigma))
}

integrate(fun, lower = -Inf, upper = Inf, mu = mu, sigma = sigma)
# 0.2497379 (EASE)

# Crude numeric approach to determine where null cannot be rejected at this EASE:
x <- log(seq(0.5, 1, by = 0.001))
se <- EmpiricalCalibration:::logRrtoSE(x, alpha = 0.05, mu, sigma)
exp(x[max(which(se > 0))])

x <- log(seq(1, 2, by = 0.001))
se <- EmpiricalCalibration:::logRrtoSE(x, alpha = 0.05, mu, sigma)
exp(x[min(which(se > 0))])
# 0.541

ncs <- simulateControls(n = 200, mean = mu, sd = sigma)
plotCalibrationEffect(ncs$logRr, ncs$seLogRr)
# 1.847

0 comments on commit 14b6707

Please sign in to comment.