Hellow folks,
I saw that the comunity is very active so i hope someone can help me. I am writing down a simple function to estimate and evaluate the beta values for a regression, as well as its respective ANOVA.
If i run my Constraints and Effects algorithm it all works fine, but once i do a simple regression using fitlm(), i cannot evaluate the ANOVA, here is my code and what i get:
mdl = fitlm(X,Y_mean,"interactions")
mdl = Linear regression model:
y ~ 1 + x1*x2
Estimated Coefficients:
Estimate SE tStat pValue
________ __ _____ ______
(Intercept) 59.95 0 Inf NaN
x1 23.85 0 Inf NaN
x2 40.3 0 Inf NaN
x1:x2 36.4 0 Inf NaN
Number of observations: 4, Error degrees of freedom: 0
R-squared: 1, Adjusted R-Squared: NaN
F-statistic vs. constant model: NaN, p-value = NaN
With such result, of course once i call anova(mdl) the answer will be bad.
What could be the root cause?
0 Comments
Sign in to comment.