I'm new to C++. I have an issue with the svd_econ() function from the Armadillo library. I ran the following code on Visual Studios 2012. I'm trying to fit a least squares regression when the regressor data are the same but the regressand data are not.
Why does the fitted value (Output1 = 7.20161E+022) differ so much from the mean (Output2 = 0.00523477)? Is there a way to overcome this?
Would this issue come up again when the regressor data are very similar? Are there ways to address this?
My guess is that the single value decomposition failed and the output objects for svd_econ() are reset to whatever laid in the memory before. Does this sound reasonable? If this is the case, is there a way to perform least squares regression for situations like this?