Multivariate regression p-values
1 view (last 30 days)
Show older comments
I am performing a multivariate regression analysis using mvregress. To compute the standard errors of the coefficient estimates, I am using sqrt(diag(CovB)), where CovB is one of the outputs of mvregress.
Just to check, I also run the same multivariate regression on R. To my surprise, the coefficient estimates are the same, but the SEs they provide are completely different. So I checked the variance-covariance matrix of the coefficient estimates in R, and it is totally different from Matlab's CovB.
Moreover, the difference is so relevant that almost all coefficient appear statistically significant in Matlab, and none of them in R.
Which software should I trust?
2 Comments
the cyclist
on 24 May 2018
Edited: the cyclist
on 24 May 2018
I can't dig deeply into this right now, but here is my perspective. Both R and MATLAB are extremely reliable software packages. Almost certainly, neither of them is wrong in what has been calculated. In my experience, problems like these are usually in the assumptions/interpretation of the user about the meaning of the output of each package.
So, to cast this in your language -- you should trust both software packages, and not your own understanding. Sorry if that seems a bit harsh, but it's my best guess as to what is going on.
If you can post a small example that exhibits the issue you are seeing, with both the R and the MATLAB code, someone might be able to help you suss it out. Who knows, maybe there really is a bug in one package or the other.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!