Hi Roni ,
I understand that you are facing issues with 'mvregress' function.
The error message you're encountering indicates that the mvregress function in MATLAB did not converge to a solution within the maximum number of iterations allowed.
To troubleshoot and potentially resolve the issue, you can try the following:
- Increase Maximum Iterations: Use the 'Options' parameter to increase the maximum number of iterations. For example:
options = statset('MaxIter', 1000);
[beta, Sigma, E] = mvregress(X, Y, 'Options', options);
- Adjust Tolerance: Adjust the convergence tolerance settings to see if this helps the algorithm converge.
- Check Data: Ensure that your data is well-conditioned for regression. Sometimes scaling or standardizing your data can help with convergence issues.
- Compare Outputs: If possible, compare intermediate outputs from both versions to see where they start to diverge. This might give you clues about what's causing the issue.
I hope this helps you resolve your issue.