Standard Error for bivariable zscore normalized regression

14 vues (au cours des 30 derniers jours)
Mahnaz Alavinejad
Mahnaz Alavinejad le 10 Sep 2021
Réponse apportée : Ive J le 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

Réponses (1)

Ive J
Ive J le 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.

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by