% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/devianlm_stats.R
\name{get_devianlm_threshold}
\alias{get_devianlm_threshold}
\title{Estimate threshold value via Monte-Carlo simulations.}
\usage{
get_devianlm_threshold(
  x,
  n_sims = 50000,
  nthreads = detectCores() - 1,
  quant = 0.95
)
}
\arguments{
\item{x}{either a numeric variable or several numeric variables
(explanatory variables) concatenated in a data frame.
\strong{Note:} \code{devianLM} does not add an intercept automatically;
include a column of ones in \code{x} if an intercept is desired.}

\item{n_sims}{Integer. Optional value which is the number of Monte-Carlo simulations. Default is 50,000.}

\item{nthreads}{Integer. Optional value which is the number of threads to use. Default is
\code{parallel::detectCores() - 1}.}

\item{quant}{Numeric. Order of the quantile of interest. Default is 0.95 (this corresponds to a  risk level of 0.05).}
}
\value{
Numeric value. \item{threshold}{The quantile of order \code{quant} of the distribution of the maximum of the absolute values of the studentized residuals (depending on the design matrix) is computed via Monte-Carlo simulations (with n_sims simulations).}
}
\description{
Estimates the threshold for the maximum absolute studentized residual in a
Gaussian linear model, conditional on the design matrix and
using \code{n_sims} Monte-Carlo simulation for the quantile of order \code{quant}.
}
\details{
Monte-Carlo simulations are parallelized using OpenMP when available.
}
