MyNixOS website logo
Description

Non-Asymptotically Valid and Asymptotically Exact (NAVAE) Confidence Intervals.

Implements the non-asymptotically valid and asymptotically exact confidence intervals in two cases: estimation of the mean, and estimation of (a linear combination of) the coefficients in a linear regression model, following (Derumigny, Girard and Guyonvarch, 2025) <doi:10.48550/arXiv.2507.16776>.

NAVAECI: Non-Asymptotically Valid and Asymptotically Exact (NAVAE) Confidence Intervals

Installation

You can install the development version of NAVAECI from GitHub with:

# install.packages("remotes")
remotes::install_github("AlexisDerumigny/NAVAECI")

Confidence interval for the mean

library(NAVAECI)

n = 4000
x = rexp(n, rate = 1/3)  # so the mean is 3
Navae_ci_mean(x, bound_K = 9, alpha = 0.1)
#> Call: Navae_ci_mean(data = x, alpha = 0.1, bound_K = 9)
#> 
#> CLT-based confidence interval:
#>      5 %     95 % 
#> 2.946852 3.106489 
#> 
#> NAVAE confidence interval:
#>      5 %     95 % 
#> 2.904051 3.149290

Confidence interval for the linear regression

n = 4000
X1 = rnorm(n, sd = 1)
true_eps = rnorm(n)
Y = 2 + 8 * X1 + true_eps

Navae_ci_ols(Y, X1, K_xi = 3, a = 1.1)
#> Call: Navae_ci_ols(Y = Y, X = X1, a = 1.1, K_xi = 3)
#> 
#> CLT-based confidence intervals:
#>              2.5 %   97.5 % estimate     length
#> intercept 1.962180 2.024766 1.993473 0.06258577
#> X1        7.987254 8.050967 8.019111 0.06371274
#> 
#> NAVAE confidence intervals:
#>              2.5 %   97.5 % regime estimate    length
#> intercept 1.717172 2.269774    Edg 1.993473 0.5526014
#> X1        7.742453 8.295769    Edg 8.019111 0.5533160
Metadata

Version

0.1.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows