How to standardize unstandardized beta coefficients

47 次查看(过去 30 天)
Hi, I read once that unstandardized beta coefficients (from regress function) can be standardized by just dividing them by the std of the respective variable. However, some simulations in Matlab tell me this is wrong. The only way I know of getting standardized betas is just to use zscored variables in the regress function, but I was wondering if there is another was to turn unstandardized betas into standardized ones. Thank you.
  4 个评论
Nuchto
Nuchto 2017-11-27
编辑:Nuchto 2017-11-27
This is what I mean:
% create IVs x1 and x2 and DV y as unstandardized variables
x1=rand(100,1)*30;
x2=rand(100,1)*2;
y=rand(100,1)*10;
% create column of ones
X=[ones(size(x1)) x1 x2];
% perform regression on these
beta1=regress(y,X)
% standardize variables and perform regression again
X=[ones(size(x1)) zscore(x1) zscore(x2)]; % attach ones
beta2=regress(zscore(y),X)
% beta2 should be equal to beta1(2)/std(x1) but it isn't
beta1(2)/std(x1)
beta2(2)

请先登录,再进行评论。

回答(3 个)

David Goodmanson
David Goodmanson 2017-11-30
Hi Nuchto
You forgot that you need to regress against the same y, otherwise it's apples and oranges. So the second regression should be
beta2=regress(y,X)
and in addition the comparison is
beta1(2)*std(x1)
beta2(2)
which does seem counterintuitive at first.

muqdad aljuboori
muqdad aljuboori 2018-6-4
编辑:muqdad aljuboori 2018-6-4
% create IVs x1 and x2 and DV y as unstandardized variables
x1=rand(100,1)*30;
x2=rand(100,1)*2;
y=rand(100,1)*10;
% create column of ones X=[ones(size(x1)) x1 x2];
% perform regression on these
beta1=regress(y,X)
% standardize variables and perform regression again
Z=[ones(size(x1)) zscore(x1) zscore(x2)]; % attach ones
beta2=regress(y,Z)
% beta2 should be equal to beta1(2)/std(x1) but it isn't
beta1(2)*std(x1)
beta2(2)
beta1(3)*std(x2)
beta2(3)
it is working now

muqdad aljuboori
muqdad aljuboori 2018-6-4
% create IVs x1 and x2 and DV y as unstandardized variables x1=rand(100,1)*30;
x2=rand(100,1)*100;
x3=rand(100,1)*521;
x4=rand(100,1)*7;
y=rand(100,1)*10; % create column of ones
X=[ones(size(x1)) x1 x2 x3 x4];
% perform regression on these
beta1=regress(y,X)
% standardize variables and perform regression again
Z=[ones(size(x1)) zscore(x1) zscore(x2) zscore(x3) zscore(x4)]; % attach ones
beta2=regress(zscore(y),Z)
% beta2 should be equal to beta1(2)/std(x1) but it isn't
beta1(2)*std(x1)/std(y)
beta2(2)
beta1(3)*std(x2)/std(y)
beta2(3)
beta1(4)*std(x3)/std(y)
beta2(4)
beta1(5)*std(x4)/std(y)
beta2(5)
this for zscore(y)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by