Package 'NAVAECI'

Title: Non-Asymptotically Valid and Asymptotically Exact (NAVAE) Confidence Intervals
Description: 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>.
Authors: Alexis Derumigny [aut, cre] (ORCID: <https://orcid.org/0000-0002-6163-8097>), Lucas Girard [aut], Yannick Guyonvarch [aut]
Maintainer: Alexis Derumigny <[email protected]>
License: GPL-3
Version: 0.1.1
Built: 2026-05-22 05:57:40 UTC
Source: https://github.com/alexisderumigny/navaeci

Help Index


Compute tuning parameters for the NAVAE confidence interval in the linear regression case

Description

Compute tuning parameters for the NAVAE confidence interval in the linear regression case

Usage

.computeTuningParameters_OLS(n, a = NULL, omega = NULL)

## S3 method for class 'NAVAE_CI_OLS_TuningParameters'
print(x, ...)

Arguments

n

sample size

a

parameter a in the function Navae_ci_ols

omega

parameter omega in the function Navae_ci_ols

x

object to be printed

...

other arguments to passed to print, currently unused.

Value

.computeTuningParameters_OLS returns an object of class NAVAE_CI_OLS_TuningParameters with the values of the tuning parameters and some information on how they were determined.

print displays information about the tuning parameters and returns x invisibly.

Examples

.computeTuningParameters_OLS(n = 1000)
.computeTuningParameters_OLS(n = 1000, a = 2)
.computeTuningParameters_OLS(n = 1000, a = list(power_of_n_for_b = -1/3))
.computeTuningParameters_OLS(n = 1000, omega = 0.2)
.computeTuningParameters_OLS(n = 1000, omega = list(power_of_n_for_omega = -0.2))

Print and coerce a NAVAE_CI_Mean object

Description

Print and coerce a NAVAE_CI_Mean object

Usage

## S3 method for class 'NAVAE_CI_Mean'
print(x, verbose = 0, ...)

## S3 method for class 'NAVAE_CI_Mean'
as.data.frame(x, ...)

Arguments

x

the object

verbose

if zero, only basic printing is done. Higher values corresponds to more detailed output.

...

other arguments, currently ignored.

Value

print.Navae_ci_ols prints information about x and returns it invisibly.

as.data.frame returns a data.frame with 2 rows.

References

Derumigny, A., Girard, L., & Guyonvarch, Y. (2025). Can we have it all? Non-asymptotically valid and asymptotically exact confidence intervals for expectations and linear regressions. ArXiv preprint, doi:10.48550/arXiv.2507.16776

See Also

The function to generate such objects Navae_ci_mean.

The corresponding methods for the regression (OLS): print.NAVAE_CI_OLS and as.data.frame.NAVAE_CI_OLS.

Examples

n = 10000
x = rexp(n, 1)
myCI = Navae_ci_mean(x, bound_K = 9, alpha = 0.2)

print(myCI)
as.data.frame(myCI)

Print and coerce a NAVAE_CI_OLS object

Description

This also displays CLT-based confidence intervals. The results are different from the confidence intervals that can be obtained via confint(lm( )) since they are robust to heteroscedasticity.

Usage

## S3 method for class 'NAVAE_CI_OLS'
print(x, verbose = 0, ...)

## S3 method for class 'NAVAE_CI_OLS'
as.data.frame(x, ...)

Arguments

x

the object

verbose

if zero, only basic printing is done. Higher values corresponds to more detailed output.

...

additional arguments, currently ignored.

Value

print.Navae_ci_ols prints information about x and returns it invisibly.

as.data.frame.NAVAE_CI_OLS returns a data frame consisting of two observations for each vector u given as a line of matrix_u, with the following columns:

  • name: name of the estimateed coefficient in the linear model

  • lower: lower bound of the confidence interval

  • upper: upper bound of the confidence interval

  • estimate: the estimated value of the coefficient

  • length: the length of the interval

  • method: the method used for the computation of the confidence intervals. This is either "Asymptotic (CLT-based), or "NAVAE (BE-based)", or "NAVAE (EE-based)".

  • regime: the regime used for the computation of the CI (only applicable for NAVAE confidence intervals). Four regimes are possible:

    • the degenerate regimes R1 and R2 in which the confidence interval is (-Inf, Inf).

    • the exponential regime Exp

    • the Edgeworth regime Edg.

References

Derumigny, A., Girard, L., & Guyonvarch, Y. (2025). Can we have it all? Non-asymptotically valid and asymptotically exact confidence intervals for expectations and linear regressions. ArXiv preprint, doi:10.48550/arXiv.2507.16776

See Also

The function to generate such objects Navae_ci_ols.

The corresponding methods for the mean: print.NAVAE_CI_Mean and as.data.frame.NAVAE_CI_Mean.

Examples

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

myCI <- Navae_ci_ols(Y, X, K_xi = 3, intercept = TRUE, a = 1.1)

print(myCI)
as.data.frame(myCI)