stepwiselm: too many output arguments
이전 댓글 표시
Running stepwiselm, I get the following results (independent variables are contained in a 5-column matrix called "ingredients" and the dependent variable is Y):
ds = dataset(ingredients(:,1),ingredients(:,2),ingredients(:,3),ingredients(:,4),ingredients(:,5),Y,'Varnames',{'a','b','c','d','e','Growth rate'});
mdl=stepwiselm(ds,'interactions');
[b,se,pval,inmodel,stats,nextstep,history]=stepwiselm(ds,'interactions');
Warning: Variable names were modified to make them valid MATLAB identifiers.
In @dataset\private\setvarnames at 43
In dataset.dataset>dataset.dataset at 384
1. Removing a:e, FStat = 0.36439, pValue = 0.54775
2. Removing a:b, FStat = 0.33757, pValue = 0.56281
3. Removing a:d, FStat = 0.29478, pValue = 0.58861
4. Removing d:e, FStat = 1.3403, pValue = 0.25022
5. Removing b:c, FStat = 2.3391, pValue = 0.12983
6. Removing c:e, FStat = 0.93838, pValue = 0.33538
7. Removing a:c, FStat = 2.4256, pValue = 0.12296
Error using stepwiselm
Too many output arguments.
MY QUESTIONS ARE AS FOLLOWS--First of all, why does it complain about having too many output arguments? And then it returns something for mdl, which actually has more coefficient estimates than described by the growth equation:
mdl =
Linear regression model:
GrowthRate ~ 1 + a + b*d + b*e + c*d
Estimated Coefficients:
Estimate SE tStat pValue
__________ __________ _______ _________
(Intercept) -0.079748 0.042445 -1.8789 0.063534
a -0.22811 0.12251 -1.8619 0.065912
b 0.01196 0.0063717 1.8771 0.063783
c 0.11473 0.064456 1.7799 0.078499
d 0.026636 0.0098081 2.7157 0.007944
e 0.023101 0.008404 2.7489 0.0072412
b:d 0.0012314 0.00060937 2.0207 0.046312
b:e -0.0040564 0.0018181 -2.2311 0.028186
c:d -0.036097 0.012224 -2.953 0.0040246
Number of observations: 98, Error degrees of freedom: 89
Root Mean Squared Error: 0.0236
R-squared: 0.79, Adjusted R-Squared 0.771
F-statistic vs. constant model: 41.9, p-value = 5.73e-27
Any thoughts??? MANY, MANY, MANY thanks in advance!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Model Building and Assessment에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!