Compute a Selective Confidence Interval Using Root-Finding
get_CI.RdThis function computes a selective confidence interval for a regression coefficient by identifying the values of the parameter for which the selective p-value equals the specified significance level.
Value
A numeric vector of length 2 giving the lower and upper bounds of the selective confidence interval.
Details
This function computes the lower and upper bounds of a confidence interval by solving for values of the parameter where the selective p-value equals the significance level alpha.
The search is performed using uniroot, which finds roots of the function defined as the difference between the selective p-value and alpha. The function expands the search range iteratively if a root is not initially found in the given interval.
If the selective p-value at the point estimate is less than or equal to alpha, the interval is considered valid. If not, an empty or infinite interval may be returned, with a warning printed.