フィルターのクリア

How to standardize unstandardized beta coefficients

9 ビュー (過去 30 日間)
Nuchto
Nuchto 2017 年 11 月 26 日
回答済み: muqdad aljuboori 2018 年 6 月 4 日
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)
Nuchto
Nuchto 2017 年 11 月 30 日
Anyone help?

サインインしてコメントする。

回答 (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.
  1 件のコメント
Nuchto
Nuchto 2018 年 4 月 7 日
Mmm, thanks! Why does it seem counterintuitive? Thanks!

サインインしてコメントする。


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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by