필터 지우기
필터 지우기

Tolerance in multiple regressions with Matlab 2012a

조회 수: 3 (최근 30일)
Louis Deslée
Louis Deslée 2015년 4월 23일
답변: Louis Deslée 2015년 4월 23일
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.

답변 (3개)

John D'Errico
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.

Star Strider
Star Strider 2015년 4월 23일
I would use stepwise or its friends to determine the best predictors.

Louis Deslée
Louis Deslée 2015년 4월 23일
Thanks for the answers. The problème isn't about writing some code, I know this is quite simple. I juste wanted to know if such a function already existed.

Community Treasure Hunt

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

Start Hunting!

Translated by