Transformation of variables in regression
6 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Ahmet Cecen
2016 年 11 月 11 日
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).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!