Why do I get NaN values in linear regression?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I run the following regression:
mdl=fitlm(Reg_var(1:end,2:end),Reg_var(1:end,1),'RobustOpts','on')
My output:
Linear regression model (robust fit):
y ~ [Linear formula with 21 terms in 20 predictors]
Estimated Coefficients:
Estimate SE tStat pValue
___________ __________ _________ ________
(Intercept) 0.0015684 0.00082514 1.9008 0.057371
x1 -0.0025121 0.0011669 -2.1528 0.031375
x2 -0.0011949 0.0011669 -1.0239 0.3059
x3 0.00021162 0.0011669 0.18135 0.8561
x4 -0.0015328 0.0011669 -1.3135 0.18905
x5 -0.0012053 0.0011669 -1.0329 0.3017
x6 -0.0020596 0.0011669 -1.7649 0.077622
x7 -0.0032643 0.0011669 -2.7974 0.005168
x8 0.00031066 0.0011669 0.26622 0.79008
x9 -0.0021079 0.0011669 -1.8063 0.070913
x10 -0.00046861 0.0011669 -0.40158 0.68801
x11 -0.00037094 0.0011659 -0.31816 0.75038
x12 -0.00017788 0.0011669 -0.15243 0.87885
x13 -5.3013e-05 0.0011669 -0.045429 0.96377
x14 -0.00072536 0.0011669 -0.6216 0.53423
x15 0 0 NaN NaN
x16 -0.00057762 0.0011669 -0.495 0.62062
x17 -0.0003968 0.0011669 -0.34004 0.73384
x18 -0.00093411 0.0011669 -0.80049 0.42346
x19 -0.0017195 0.0011669 -1.4735 0.14065
x20 -0.0015061 0.00096437 -1.5618 0.11839
Number of observations: 6260, Error degrees of freedom: 6240
Root Mean Squared Error: 0.014
R-squared: 0.0043, Adjusted R-Squared 0.00127
F-statistic vs. constant model: 1.42, p-value = 0.107
Why do I get NaN values at dummy 15 and what does this mean? How can I solve this? What am I doing wrong?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!