This function either (a) resamples residuals via a nonparametric bootstrap
to generate an empirical NRMSE sample, or (b) produces synthetic right-hand
side vectors b from a user-defined or default distribution and
re-estimates the model. It tests whether the observed NRMSE significantly
deviates from the null distribution of resampled or simulated NRMSE values.
ttest(
object,
reset = FALSE,
sample_size = 50L,
seed = NULL,
distribution = NULL,
partial = FALSE,
simulate = FALSE
)A named list containing test results and null distribution statistics:
P(nrmse \(\le\) null mean)
P(nrmse \(\ge\) null mean)
2-sided t-test p-value
Observed value
Mean of null distribution
Standard deviation of null distribution
An object of class "clsp".
Logical, default = FALSE.
If TRUE, forces recomputation of the NRMSE null distribution.
Integer, default = 50.
Size of the Monte Carlo simulated sample under H0.
Integer or NULL, default = NULL.
Optional random seed to override the default.
Function or NULL, default = NULL.
Distribution for generating synthetic b vectors. One of:
rnorm, runif, or a custom RNG function. Defaults to
standard normal.
Logical, default = FALSE.
If TRUE, runs the t-test on the partial NRMSE: during simulation,
the C-block entries are preserved and the M-block entries are simulated.
Logical, default = FALSE.
If TRUE, performs a parametric Monte Carlo simulation by generating
synthetic right-hand side vectors b. If FALSE (default),
executes a nonparametric bootstrap procedure on residuals without
re-estimation.