Standard Error for bivariable zscore normalized regression

조회 수: 3 (최근 30일)
Mahnaz Alavinejad
Mahnaz Alavinejad 2021년 9월 10일
답변: Ive J 2021년 9월 11일
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