필터 지우기
필터 지우기

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 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