Code covered by the BSD License  

Highlights from
Discriminant Analysis Programme

image thumbnail
from Discriminant Analysis Programme by Bartolomeu Rabacal
Discrimination and Classification of data to and from groups with classical/robust estimation

computeLinearModel(covList, m_constants)
function pooledCov = computeLinearModel(covList, m_constants)

% Linear Model Algorithm

% Johnson, R.A. & Wichern, D.W. Applied Multivariate Statistical Analysis,
% Prentice -Hall

pooledCov = zeros(m_constants.numVar);
for i = 1:m_constants.numGrp 
    pooledCov = pooledCov + (m_constants.numElemPerGrp(i) - 1) * covList{i};
end

pooledCov = pooledCov / (sum(m_constants.numElemPerGrp) - m_constants.numGrp);

Contact us at files@mathworks.com