I have the following code and I'm trying with 2 different methods to solve a multiple regression equation. The arrays are too long to list but the count on each one matches at 5704 lines. I'm getting the following errors when I try to run the code
// getting An unhandled exception of type 'System.ArgumentException' occurred in MathNet.Numerics.dll
Additional information: Matrix must be positive definite.
double[] p = Fit.MultiDim(
new[] { shortRatingList.ToArray(), mediumRatingList.ToArray(), longRatingList.ToArray() },
weekReturnList.ToArray(),
intercept: true);
// getting An unhandled exception of type 'System.ArgumentException' occurred in MathNet.Numerics.dll
Additional information: Matrix dimensions must agree: 3x5705.
double[] q = MultipleRegression.QR(
new[] { shortRatingList.ToArray(), mediumRatingList.ToArray(), longRatingList.ToArray() },
weekReturnList.ToArray(),
intercept: true);