| Type: | Package |
| Title: | Non-Asymptotically Valid and Asymptotically Exact (NAVAE) Confidence Intervals |
| Version: | 0.1.1 |
| 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>. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| Imports: | BoundEdgeworth, expm |
| RoxygenNote: | 7.3.3 |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-01-16 12:43:11 UTC; aderumigny |
| Author: | Alexis Derumigny |
| Maintainer: | Alexis Derumigny <a.f.f.derumigny@tudelft.nl> |
| Repository: | CRAN |
| Date/Publication: | 2026-01-21 20:00:13 UTC |
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 |
omega |
parameter omega in the function |
x |
object to be printed |
... |
other arguments to passed to |
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))
Compute NAVAE CI for the expectation based on empirical mean estimator and Berry-Esseen (BE) or Edgeworth Expansions (EE) bounds
Description
Compute NAVAE CI for the expectation based on empirical mean estimator and Berry-Esseen (BE) or Edgeworth Expansions (EE) bounds
Usage
Navae_ci_mean(
data,
alpha = 0.05,
a = "best",
bound_K = NULL,
known_variance = NULL,
param_BE_EE = list(choice = "best", setup = list(continuity = FALSE, iid = TRUE,
no_skewness = FALSE), regularity = list(C0 = 1, p = 2), eps = 0.1),
na.rm = FALSE
)
Arguments
data |
vector of univariate observations. |
alpha |
this is 1 minus the confidence level of the CI; in other words,
the nominal level is |
a |
the free parameter
|
bound_K |
bound on the kurtosis K_4(theta) of the distribution of the
observations that are assumed to be i.i.d.
The choice of |
known_variance |
by default NULL, in this case, the function computes the CI in the general case with an unknown variance (which is estimated). Otherwise, a scalar numeric vector equal to the (assumed/known) variance. (NB: if the option is used, one must provide the variance and not the standard deviation.) |
param_BE_EE |
parameters to compute the BE or EE bound
as described in the arguments of the function
By default, following Remark 3.3 of the article, |
na.rm |
logical, should missing values in |
Value
Navae_ci_mean returns an object of class
NAVAE_CI_Mean, containing:
-
ci_navae: the NAVAE confidence interval -
ci_asymp: the classical "asymptotic" CI based on CLT (as a comparison) -
indicator_R_regime: 1 if we are in the\mathbb{R}regime and 0 else. -
delta_n,delta_n_from: respectively the numerical value of the bounddelta_nused, and a character stringBEorEEindicating which type of inequality was used. -
minimal_alpha_to_exit_R_regime: the minimal alpha to exit the\mathbb{R}regime. -
bound_K_value,bound_K_method: the value K used and the method to compute it.
References
For the confidence interval:
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.
For the underlying Edgeworth expansion bounds:
Derumigny A., Girard L., and Guyonvarch Y. (2023). Explicit non-asymptotic bounds for the distance to the first-order Edgeworth expansion, Sankhya A. doi:10.1007/s13171-023-00320-y ArXiv preprint: doi:10.48550/arxiv.2101.05780.
See Also
Navae_ci_ols the corresponding function for the linear
regression case.
Some methods for the returned object: print.NAVAE_CI_Mean and
as.data.frame.NAVAE_CI_Mean.
Examples
n = 10000
x = rexp(n, 1)
Navae_ci_mean(x, bound_K = 9, alpha = 0.2)
Navae_ci_mean(x, bound_K = 9, alpha = 0.2, a = 1 + n^(-2/5))
# Same as:
Navae_ci_mean(x, bound_K = 9, alpha = 0.2, a = list(power_of_n_for_b = -2/5))
# plug-in for K ( = data-driven choice of K)
Navae_ci_mean(x, alpha = 0.2)
listParams1 = list(
choice = "best",
setup = list(continuity = FALSE, iid = TRUE, no_skewness = FALSE),
regularity = list(C0 = 1, p = 2),
eps = 0.1)
listParams2 = list(
choice = "best",
setup = list(continuity = TRUE, iid = TRUE, no_skewness = FALSE),
regularity = list(kappa = 0.99), eps = 0.1)
Navae_ci_mean(x, alpha = 0.1, param_BE_EE = listParams1)
Navae_ci_mean(x, alpha = 0.1, param_BE_EE = listParams2)
Navae_ci_mean(x, alpha = 0.05, param_BE_EE = listParams1)
Navae_ci_mean(x, alpha = 0.05, param_BE_EE = listParams2)
Compute NAVAE CI for coefficients of a linear regression based on the OLS estimator and Berry-Esseen (BE) or Edgeworth Expansions (EE) bounds
Description
Compute NAVAE CI for coefficients of a linear regression based on the OLS estimator and Berry-Esseen (BE) or Edgeworth Expansions (EE) bounds
Usage
Navae_ci_ols(
Y,
X,
alpha = 0.05,
a = NULL,
omega = NULL,
bounds = list(lambda_reg = NULL, K_reg = NULL, K_eps = NULL, K_xi = NULL, C = NULL, B =
NULL),
K_xi = NULL,
param_BE_EE = list(choice = "best", setup = list(continuity = FALSE, iid = TRUE,
no_skewness = FALSE), regularity = list(C0 = 1, p = 2), eps = 0.1),
intercept = TRUE,
options = list(center = FALSE, bounded_case = FALSE, with_Exp_regime = FALSE),
matrix_u = NULL,
verbose = 0
)
Arguments
Y |
vector of observations of the explained variables |
X, intercept |
|
alpha |
this is 1 minus the confidence level of the CI; in other words,
the nominal level is 1 - alpha.
By default, |
a |
the free parameter
|
omega |
the free parameter
|
bounds, K_xi |
list of bounds for the DGP. Note that
The bounds that are not given are replaced by plug-ins. For K3_xi, lambda3_xi and K3tilde_xi, the bounds are obtained from K_xi (= K4_xi). |
param_BE_EE |
parameters to compute the BE or EE bound
|
options |
a list of other options (experimental). |
matrix_u |
each row of this matrix is understood as a new vector u
for which a confidence interval should be computed.
By default |
verbose |
If |
Value
Navae_ci_ols returns an object of class NAVAE_CI_OLS,
containing
-
ci_navae: the NAVAE confidence interval -
ci_asymp: the classical "asymptotic" CI based on CLT (as a comparison) -
allTuningParameters,allBounds: information concerning the tuning parameters and the bounds used (numerical value and origin) -
about_delta_n,delta_n_from: respectively the numerical value of the bounddelta_nused, and a character stringBEorEEindicating which type of inequality was used. -
minimal_alpha_to_exit_R_regime: the minimal alpha to exit the\mathbb{R}regime. -
bound_K_value,bound_K_method: the value K used and the method to compute it.
References
For the confidence interval:
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.
For the underlying Edgeworth expansion bounds:
Derumigny A., Girard L., and Guyonvarch Y. (2023). Explicit non-asymptotic bounds for the distance to the first-order Edgeworth expansion, Sankhya A. doi:10.1007/s13171-023-00320-y ArXiv preprint: doi:10.48550/arxiv.2101.05780.
See Also
The methods to display and process the output of this function:
print.NAVAE_CI_OLS and
as.data.frame.NAVAE_CI_OLS.
Navae_ci_mean which is the corresponding function for the
estimation of the mean.
Examples
n = 4000
X1 = rnorm(n, sd = 1)
true_eps = rnorm(n)
Y = 2 + 8 * X1 + true_eps
myCI <- Navae_ci_ols(Y, X1, K_xi = 3, a = 1.1)
print(myCI)
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
R1andR2in which the confidence interval is(-Inf, Inf).the exponential regime
Expthe 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)