Tolerance in multiple regressions with Matlab 2012a
3 次查看(过去 30 天)
显示 更早的评论
Hello guys,
Following multiple regression analysis, I need to calculate Tolerance for each of my independant variables. (In multiple regression, tolerance is used as an indicator of multicollinearity. Tolerance is estimated by 1 - R2, where R2 is calculated by regressing the independent variable of interest onto the remaining independent variables included in the multiple regression analysis.)
Is there a function to calculate this ? I own the statistical toolbox.
0 个评论
回答(3 个)
John D'Errico
2015-4-23
编辑:John D'Errico
2015-4-23
I don't see the problem if you can't find it. Just loop over the variables, calling regress on each subset.
If you WANTED to compute those statistics, yes, you can do so with some effort. Were I to do so, I would compute a QR factorization of the complete design matrix. Then in a loop, I would use QR delete to downdate that factorization, selectively removing each column in turn. Then use the downdated factorization to model the deleted column of the design matrix, then computing R^2. This is not difficult, but it would force you to do more work than direct calls to a tool like regress & regstats.
The advantage of the scheme I've offered is it should be a bit faster, since a QR downdate should be faster to compute than the QR factorization itself. As well, if you can do the computations to compute R^2 directly, without going through a tool like regstats, then it will be faster. The cost is it requires you to write some code.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!