EpiForsk
Code Sharing at the Department of Epidemiology Research at Statens Serum Institut
Description
This is a collection of assorted functions and examples collected from various projects. Currently we have functionalities for simplifying overlapping time intervals, Charlson comorbidity score constructors for Danish data, getting frequency for multiple variables, getting standardized output from logistic and log-linear regressions, sibling design linear regression functionalities a method for calculating the confidence intervals for functions of parameters from a GLM, Bayes equivalent for hypothesis testing with asymptotic Bayes factor, and several help functions for generalized random forest analysis using 'grf'.
Downloads
375
Last 30 days
10113th
817
Last 90 days
2.8K
Last year
Trend: +70.5% (30d vs prior 30d)
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | ERROR |
| r-oldrel-macos-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (1 non-OK)
examples
Running examples in ‘EpiForsk-Ex.R’ failed
The error most likely occurred in:
> ### Name: fct_confint
> ### Title: Confidence set for functions of model parameters
> ### Aliases: fct_confint fct_confint.lm fct_confint.glm fct_confint.lms
> ### fct_confint.default
>
> ### ** Examples
>
> data <- 1:5 |>
+ purrr::map(
+ \(x) {
+ name = paste0("cov", x);
+ dplyr::tibble("{name}" := rnorm(100, 1))
+ }
+ ) |>
+ purrr::list_cbind() |>
+ dplyr::mutate(
+ y = rowSums(dplyr::across(dplyr::everything())) + rnorm(100)
+ )
> lm <- lm(
+ as.formula(
+ paste0("y ~ 0 + ", paste0(names(data)[names(data) != "y"], collapse = " + "))
+ ),
+ data
+ )
> fct_confint(lm, sum)
Error in (function (.x, .f, ..., .progress = FALSE) : ℹ In index: 1.
Caused by error in `Rmosek::mosek()`:
! Unknown exported object to be built. Please use 'Rmosek::mosek_attachbuilder' to complete the installation of Rmosek.
Calls: fct_confint ... tryCatchList -> tryCatchOne -> <Anonymous> -> ci_fct_error_handler
Execution halted
Check History
ERROR 6 OK · 0 NOTE · 0 WARNING · 8 ERROR · 0 FAILURE Mar 10, 2026
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
dependencies in R code
Missing or unexported object: 'CVXR::solve'
dependencies in R code
Missing or unexported object: ‘CVXR::solve’
dependencies in R code
Missing or unexported object: 'CVXR::solve'
dependencies in R code
Missing or unexported object: 'CVXR::solve'