lumen provides hypothesis tests, confidence intervals, and selected statistical distribution utilities used in the DescToolsX ecosystem. It is designed as a focused statistical companion package: methodologically transparent, API-consistent, and suitable for use in applied statistical workflows.
The package is currently under active development.
You can install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("AndriSignorell/lumen")The package requires R >= 4.2.0.
lumen collects statistical procedures that are commonly useful in exploratory analysis, inference, and methodological comparison. The current package includes:
- hypothesis tests for goodness-of-fit, normality, stationarity, randomness, contingency tables, marginal homogeneity, and nonparametric group comparisons
- confidence intervals for proportions, differences and ratios of proportions, means, medians, variances, correlations, regression coefficients, and related quantities
- post-hoc procedures and multiple-comparison helpers
- selected distribution functions, including extreme-value, Dirichlet, Gompertz, triangular, Benford, and order-statistic distributions
- bootstrap confidence interval helpers
library(lumen)
binomCI(x = 37, n = 43, method = "wilson")
binomCI(x = 42, n = 43, method = "clopper-pearson")x <- rnorm(50)
andersonDarlingTest(x, null = "pnorm", mean = mean(x), sd = sd(x), estimated = TRUE)x <- c(1.1, 1.4, 1.6, 2.0, 2.2)
y <- c(1.0, 1.2, 1.3, 1.7, 1.9)
siegelTukeyTest(x, y)tab <- matrix(c(8, 14, 1, 3), nrow = 2)
barnardTest(tab)set.seed(1984)
bootCI(mtcars$mpg, FUN = mean, na.rm = TRUE, bci.method = "basic")lumen follows the broader DescToolsX design philosophy:
- predictable lowerCamelCase function names
- explicit argument validation
- transparent method choices
- clean separation between user-facing interfaces and computational engines
- compatibility with familiar base R idioms where appropriate
Most hypothesis tests return objects compatible with the standard htest interface. Confidence interval functions generally return compact vectors or matrices with estimates and interval bounds.
andersonDarlingTest()— Anderson-Darling goodness-of-fit testbartelsRankTest()— Bartels rank test for randomnessbarnardTest()— Barnard's unconditional test for 2 x 2 tablesbhapkarTest()— Bhapkar marginal homogeneity testbreslowDayTest()— Breslow-Day test for homogeneity of odds ratioscochranArmitageTest()— Cochran-Armitage trend testcochranQTest()— Cochran's Q testcramerVonMisesTest()— Cramer-von Mises goodness-of-fit testdurbinWatsonTest()— Durbin-Watson testjarqueBeraTest()— Jarque-Bera normality testkpssTest()— KPSS stationarity testleveneTest()— Levene test for equality of varianceslillieTest()— Lilliefors normality testsiegelTukeyTest()— Siegel-Tukey test for scale differencesstuartMaxwellTest()— Stuart-Maxwell marginal homogeneity testwoolfTest()— Woolf test for homogeneity of odds ratios
binomCI()— confidence intervals for binomial proportionsbinomDiffCI()— confidence intervals for differences of binomial proportionsbinomRatioCI()— confidence intervals for ratios of binomial proportionsbootCI()— bootstrap confidence intervalscorCI()— confidence intervals for correlationsmeanCI()— confidence intervals for meansmedianCI()— confidence intervals for mediansmultinomCI()— confidence intervals for multinomial proportionspoissonCI()— confidence intervals for Poisson ratesquantileCI()— confidence intervals for quantilesvarCI()— confidence intervals for variances
dgev(),pgev(),qgev(),rgev()— generalized extreme value distributiondgpd(),pgpd(),qgpd(),rgpd()— generalized Pareto distributiondgumbel(),pgumbel(),qgumbel(),rgumbel()— Gumbel distributionddirichlet(),pdirichlet(),qdirichlet(),rdirichlet()— Dirichlet distributiondtri()— triangular distributiondbenford()— Benford distributionscores()— score generation helper
lumen imports several packages used for statistical computation and infrastructure, including boot, aurora, bedrock, Exact, mvtnorm, stats, withr, and gld. C++ support is provided through Rcpp, RcppParallel, and RcppArmadillo.
The development documentation is available at:
https://andrisignorell.github.io/lumen/
The source repository is available at:
https://github.com/AndriSignorell/lumen/
Issues and feature requests can be submitted at:
https://github.com/AndriSignorell/lumen/issues
lumen is released under GPL (>= 2).
This package is experimental and versioned as 0.0.0.907. Interfaces may still change before a stable release.