This package determines whether the maximum of the absolute values of the studentized residuals of a Gaussian regression is abnormally high. The distribution of the maximum of the absolute of the studentized residuals (depending on the design matrix) is computed via Monte-Carlo simulations (with n_sims simulations).
get_devianlm_threshold(
x,
n_sims = 50000,
nthreads = detectCores() - 1,
quant = 0.95
)Numeric value.
The quantile of order 1-alpha of the distribution of the maximum of the absolute of the studentized residuals (depending on the design matrix) is computed via Monte-Carlo simulations (with n_sims simulations).
either a numeric variable or several numeric variables (explanatory variables) concatenated in a data frame. **Note:** `devianLM` does not add an intercept automatically; include a column of ones in `x` if an intercept is desired.
optional value which is the number of simulations, is set to 50.000 by default.
optional value which is the number of CPU cores to use, is set to "number of CPU cores - 1" by default.
quantile of interest, is set to 0.95 by default (this corresponds to a risk level of 0.05).