Relative Importance of explanatory variables in a linear regression
Show older comments
How do I get the relative importance of different explanator variables in a linear regression? I am not looking for t-stat which just tells you whether a variable is statistically signficant or not. What I am looking for is a metric (something like relative R-square) which tells me whether x1 is more important than x2 (y = a + b1x1 + b2x2 + epsilon) or not. R has relaimpo routine. Does Matlab have something similar?
Answers (1)
the cyclist
on 3 Feb 2013
2 votes
If you have the Statistics Toolbox, then I think the functions stepwise() and stepwisefit() will do what you want. They will tell you in what order each explanatory variable comes in, and how much of the variance in the response variable is explained by each one.
You can also use the corr() function to see what the correlation of each explanatory variable has with the response variable.
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!