Standard Error for bivariable zscore normalized regression

3 views (last 30 days)
Mahnaz Alavinejad
Mahnaz Alavinejad on 10 Sep 2021
Answered: Ive J on 11 Sep 2021
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

Answers (1)

Ive J
Ive J on 11 Sep 2021
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.

Tags

Community Treasure Hunt

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

Start Hunting!