www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreginterprbf/stats.m
function varargout= stats(m,opt,x,y) %STATS Get statistics for xreginterprbf object % % STATS(M,'Summary',X,Y). % [O1,O2]=STATS(M,'Validate',X,Y). % STATS(M,'Stepwise'). % % See also COLHEAD. % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. switch lower(opt) case 'summary' n= length(y); p= numParams(m); bc= get(m,'boxcox'); % natural yhat = eval( m, x ); resr = y - yhat; if n > p, sse = sqrt(sum( resr.^2 )/(n-p)); % possible non-zero residual if there are coincident nodes else sse = 0; end s = [n p bc sse]; varargout{1}=s; case 'validate' varargout{1}= y(isfinite(y)); varargout{2}= y(isfinite(y)); case 'stepwise' s= NaN*zeros(4,3); varargout{1}= s; otherwise varargout=cell(1,nargout); end