Compute weighted R-squared for a weighted least-squares auxiliary regression.
Arguments
- y
Numeric response vector.
- X
Numeric design matrix, usually including an intercept.
- w
Nonnegative weight vector.
Value
Weighted R-squared, or NA_real_ if it cannot be computed.