フィルターのクリア

Transformation of variables in regression

4 ビュー (過去 30 日間)
hdiba
hdiba 2016 年 11 月 11 日
回答済み: Ahmet Cecen 2016 年 11 月 11 日
Hi everybody, I have a question on multiple linear regression. I'd like to check several transformations of my independent variables (for example 1/x, x^2, sqrt(x)) in order to get a better adjusted r2. i have 5 independent variables (x1, x2, x3, x4, x5) and i would like to check the impact of different transformations at the same time. for example, one possibility would be y=1/x1+x2*x2+x3*x3+sqrt(x4)+1/x5.
in the end, the output would be the best fitted model.(crieterion=adjr2) can anyone help? thanks a lot

回答 (1 件)

Ahmet Cecen
Ahmet Cecen 2016 年 11 月 11 日
You can use my MultiPolyRegress.
Now this deviates from your parameters a little.
1) The code is limited to standard polynomial bases with minor modifications. But you can use 90% of the code with some manipulation for other transformations as well.
2) The code doesn't calculate adjusted R square, but calculates Leave One Out Cross Validated metrics automatically. You can use it for overfitting detection by comparing how close the RSquare is to CV_RSquare (closer the better).

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by