Clear Filters
Clear Filters

p values equal to 0

29 views (last 30 days)
jari jafri
jari jafri on 7 Dec 2023
Edited: Angelo Yeo on 8 Dec 2023
i have a data set where i have x variable is a matrix of 3 obseravtions and y has only 1 output vaues. i have total 2229207x3 double values for X and 2229207x1 double values for Y. I use mdl =fitlm(x,y) command to find the equation of the model but it is strange that all my P vales are zero. Any help will be highly appericiated. Or if anyone can guide me how to get the equation or model for the proposed data. Thanks in advance
mdl =
Linear regression model:
y ~ 1 + x1 + x2 + x3
Estimated Coefficients:
Estimate SE tStat pValue
________ _______ _______ ______
(Intercept) 2971.5 9.8109 302.88 0
x1 -90.082 0.11433 -787.89 0
x2 30.18 0.47569 63.445 0
x3 -44.055 0.34794 -126.62 0

Answers (2)

Star Strider
Star Strider on 7 Dec 2023
The ‘pValue’ of 0 means that with extremely high degrees-of-freedom (estimating 4 parameters with 2229207 observations) and apparently a good fit to the data (although those statistics aren’t shown), the probability that the parameter values could be equal to 0 is essentially 0 (or so low that it is beyond the ability of floating-point calculations to express them as anything other than 0). The parameter confidence intervals would essentially be the same values as the parameters themselves, or with very small differences from them, within the computational limits of floating-point numbers.
So the parameter values are highly significant, and cannot be accounted for by anything other than your regression model.

Angelo Yeo
Angelo Yeo on 8 Dec 2023
Edited: Angelo Yeo on 8 Dec 2023
A side note: Too many samples can easily lead to very small number of p-value. This may be the reason why all the p-values became 0. See the picture below for visual explanation.

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!