Closed bdemeshev closed 7 years ago
I looked into this issue. There is no difference in the data across the two scenarios. However, in cv.BigVAR the most recent coefficient matrix for beta as well as the most recent "active set" is used as an initialization whereas in BigVAR.est it starts from a coefficient matrix of zeros. If you remove the initialization by adding the code:
beta <- array(0,dim=c(k,p*k+1,1)) activeset <- rep(list(rep(rep(list(0), length(kk)))), gran2)
before line 877 in BigVARSupportFunctions.R, both functions will return identical results.
As another potential alternative, reducing the optimization tolerance (currently .0001) would decrease this discrepancy.
That's perfect! I think I will close the issue and open a new one in some minutes ;)
First, thank you for the package! :)
Why the functions
cv.BigVAR
andBigVAR.est
give different estimates of beta for the same lambda? Or am I missing something with the training sample?