www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreginterprbf/evalpev.m

    function PEV= evalpev(x,m,FindMax,YVAR);
% xreglinear/EVALPEV evaluate Prediction Error Variance for model
%
% PEV = evalpev(x,m,FindMax)
%   x is in coded units
%   m is the model. InitStore must be called on m before this function
%   FindMax==1 returns -PEV for use in maximising PEV (i.e. G optimality)
% 
% If y data is available
%     PEV = x'* s^2*inv(X'*X) * x
% otherwise PEV = x'* inv(X'*X) * x
% 
% See also xreglinear/PEVGRID

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.



PEV= zeros(size(x,1),1);