How to standardize unstandardized beta coefficients

10 visualizaciones (últimos 30 días)
Nuchto
Nuchto el 26 de Nov. de 2017
Respondida: muqdad aljuboori el 4 de Jun. de 2018
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 comentarios
Nuchto
Nuchto el 27 de Nov. de 2017
Editada: Nuchto el 27 de Nov. de 2017
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 el 30 de Nov. de 2017
Anyone help?

Iniciar sesión para comentar.

Respuestas (3)

David Goodmanson
David Goodmanson el 30 de Nov. de 2017
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 el 4 de Jun. de 2018
Editada: muqdad aljuboori el 4 de Jun. de 2018
% 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 el 4 de Jun. de 2018
% 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)

Categorías

Más información sobre Descriptive Statistics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by