R solve:system is exactly singular

后端 未结 3 826
再見小時候
再見小時候 2020-12-01 17:54

I am solving simple optimization problem. The data set has 26 columns and over 3000 rows. The source code looks like

Means   <- colMeans(Returns)
Sigma           


        
3条回答
  •  鱼传尺愫
    2020-12-01 18:43

    I guess your code uses somewhere in the second case a singular matrix (i.e. not invertible), and the solve function needs to invert it. This has nothing to do with the size but with the fact that some of your vectors are (probably) colinear.

提交回复
热议问题