在 06-4-28,Jinsong Zhao<[EMAIL PROTECTED]> 写道:
Dear all,
I have encountered a problem when perform stepwise regression.
The dataset have more 9 independent variables, but 7 observation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I think
this is the problem.
In R, before performing stepwise, a lm object should be given.
fm <- lm(y ~ X1 + X2 + X3 + X11 + X22 + X33 + X12 + X13 + X23)
However, summary(fm) will give:
Residual standard error: NaN on 0 degrees of freedom
Multiple R-Squared: 1, Adjusted R-squared: NaN
F-statistic: NaN on 6 and 0 DF, p-value: NA
In this situation, step() or stepAIC() will not give any useful information.
I don't know why SAS could deal with this situation:
PROC REG;
MODEL y=X1 X2 X3 X11 X22 X33 X12 X13 X23/SELECTION=STEPWISE;
RUN;
Any help will be really appreciated.
Wishes,
Jinsong Zhao
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
黄荣贵
Deparment of Sociology
Fudan University
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html