文档介绍:end
end
end
end
end
多元逐步回归分析算法
2010年05月04日星期二下午04:35
自己编写的多元逐步回归分析算法matlab程序,在matlab工具箱中已经提供了一个可视化的图形界面分析窗口,但=1
disp(['S='int2str(S)])%输出S=1else
disp(['VMIN='num2str(VN)';IMIN='
int2str(IN)])%输出Vmin=VN;Imin=IN;
endifS==1%||S==2||S==3
FE=VX*(n-L-2)/(R(m,m)-VX);
disp(['FE='num2str(FE)])%输出FEifFEifL~=0
disp('NeitherDeleteOutNor
SelectIn!')
else
disp('MayBeSmallerF1AndF2')
disp('TheStepwiseRegressionAnalysisEnd!')
break;%程序结束
endelse
L=L+1;FQ=FQ-1;K=IX;
disp(['X'int2str(K)'BeSelectedIn'])
Imin(outt+1)=IX;outt=outt+1;
end
end
end
ifL~=0
disp('NeitherDelete
disp('TheStepwise
break;%程序结束else
disp('MayBeSmaller
disp('TheStepwise
break;%程序结束
end
L=L+1;FQ=FQ-1;K=IX;
disp(['X'int2str(K)'Be
disp(['L='int2str(L)])
Imin(outt+1)=IX;outt=outt+1;
R=xiaoqu(R,K)%调用子函数,执
ifL~=m-1
continue;
end
disp('AlreadySelectingEnd')break;
disp(['L='int2str(L)])R=xiaoqu(R,K)%调用子函数,执行消去变换
ifL~=m-1
continue;
enddisp('AlreadySelectingEnd')break;
end
else
%计算剔除变量的F检验值
FT=VN*(n-L-1)/R(m,m);
disp(['剔除变量的F检验值’num2str(FT)])ifFT>=F2
FE=VX*(n-L-2)/(R(m,m)-VX);
disp(['***FE二'num2str(FE)])%输出FEif
FE
OutNorSelectIn!')
RegressionAnalysisEnd!')
F1AndF2')
RegressionAnalysisEnd!')
else
SelectedIn'])
行消去变换
end
end
else
L=L-1;FQ=FQ+1;K=IN;disp(['X'int2str(K)'BeDeletedOut'])
disp(['L='int2str(L)'()'])
R=xiaoqu(R,K)%调用子函数continue