Multivariate regression p-values

3 次查看(过去 30 天)
Maria445
Maria445 2018-5-23
评论: Maria445 2018-5-24
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 个评论
the cyclist
the cyclist 2018-5-24
编辑:the cyclist 2018-5-24
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.
Maria445
Maria445 2018-5-24
You were right, none of them was wrong; the difference in the variance-covariance matrix of the coefficient estimates was due to the fact that Matlab was using the cwls algorithm, while R was solving using the maximum likelihood method...now I'm just wondering why the 2 methodologies lead to such different results in terms of significancy of the parameters

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by