Computes an estimate of the error variance to be used in selective inference,
based on a rescaled residual sum of squares from a linear regression model.
Usage
get_variance_estimate(X, Y, alpha_ov)
Arguments
- X
A numeric matrix of predictor variables with n rows and p columns.
- Y
A numeric response vector of length n.
- alpha_ov
The significance level used in the overall F-test.
Value
A numeric value representing the estimated variance used for selective inference.
Details
This function estimates the variance of the error term under the assumption that
inference is performed conditional on rejection of the overall F-test.