Standard Error for bivariable zscore normalized regression

3 次查看(过去 30 天)
Can someone explain why I get exactly same value of satndard error when I use fitlm for two variables x1 and x2 that are zscore normalized?
x=[zscore(x1) zscore(x2)]
fitlm(x,y)
x=0.5519 -1.5191
0.8152 0.9382
-1.4367 0.8976
0.8371 -0.5285
0.0246 0.4234
-1.5218 -1.5667
-0.9986 -0.7207
-0.2226 0.7723
0.9647 0.3990
0.9861 0.9046
y=0.6557
0.0357
0.8491
0.9340
0.6787
0.7577
0.7431
0.3922
0.6555
0.1712

回答(1 个)

Ive J
Ive J 2021-9-11
And why is it surprising to you?
You can read about how coefficients and their SE are calculated in linear regression. Standardized IVs have 0 mean and variance of 1. One component of SE(β) is inv(X*X'), where X is your design matrix, more precisely:
se = sqrt(model.MSE.*diag(inv(X*X'))); % model: object output of fitlm
So: . We also know IVs have variance of 1, so , so we can simplify this to , which only depdends on IVs length.

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by