A function for smoothing a non-positive definite correlation matrix by the method of Knol and Berger (1991).
smoothKB(R, eps = 1e+08 * .Machine$double.eps)
A non-positive definite correlation matrix.
Small positive number to control the size of the non-scaled smallest eigenvalue of the smoothed R matrix. Default = 1E8 * .Machine$double.eps
A Smoothed (positive definite) correlation matrix.
Small positive number to control the size of the non-scaled smallest eigenvalue of the smoothed R matrix.
Knol, D. L., & Berger, M. P. F., (1991). Empirical comparison between factor analysis and multidimensional item response models.Multivariate Behavioral Research, 26, 457-477.
# NOT RUN {
data(BadRLG)
## RKB = smoothed R
RKB<-smoothKB(R=BadRLG, eps = 1E8 * .Machine$double.eps)$RKB
print(eigen(RKB)$values)
# }
Run the code above in your browser using DataLab