Relative Importance of explanatory variables in a linear regression

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)

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.

Asked:

on 1 Feb 2013

Community Treasure Hunt

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

Start Hunting!